All of lore.kernel.org
 help / color / mirror / Atom feed
* [lustre-devel] Lustre and libreadline
@ 2015-06-03 18:32 Patrick Farrell
  2015-06-03 18:57 ` Ned Bass
  0 siblings, 1 reply; 10+ messages in thread
From: Patrick Farrell @ 2015-06-03 18:32 UTC (permalink / raw)
  To: lustre-devel

Good afternoon,

Cray has recently discovered that 'lfs getstripe' crashes with a null 
pointer if it is not built with libreadline (Found in 'readline-devel').

When built without libreadline, Lustre uses its own implementation of 
the readline components it needs.  (Look for "HAVE_LIBREADLINE" in 
libcfs/libcfs/util/parser.c)  This is the source of the null pointer.

I think libreadline should be available on every platform we wish to 
build Lustre on, so I'd rather not fix the broken internal version of 
it.  Given that, is there any objection to adding an explicit 
BuildRequires to the spec, making it mandatory in the config process, 
and removing all traces of Lustre's internal readline implementation?  
If not, I'll open a Jira ticket to do this.

- Patrick

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-03 18:32 [lustre-devel] Lustre and libreadline Patrick Farrell
@ 2015-06-03 18:57 ` Ned Bass
  2015-06-03 20:27   ` Patrick Farrell
  0 siblings, 1 reply; 10+ messages in thread
From: Ned Bass @ 2015-06-03 18:57 UTC (permalink / raw)
  To: lustre-devel

Hi Patrick,

LLNL builds a stand-alone liblustreapi library for our BG/Q compute
nodes, and readline isn't available there. Now, since we just install
the library and not the utils we don't actually need readline. Perhaps
rather than making the readline configurue check stricly mandatory, we
could add a --disable-utils option which, if specified, would make
readline optional.

Thanks,
Ned

On Wed, Jun 03, 2015 at 01:32:05PM -0500, Patrick Farrell wrote:
> Good afternoon,
> 
> Cray has recently discovered that 'lfs getstripe' crashes with a
> null pointer if it is not built with libreadline (Found in
> 'readline-devel').
> 
> When built without libreadline, Lustre uses its own implementation
> of the readline components it needs.  (Look for "HAVE_LIBREADLINE"
> in libcfs/libcfs/util/parser.c)  This is the source of the null
> pointer.
> 
> I think libreadline should be available on every platform we wish to
> build Lustre on, so I'd rather not fix the broken internal version
> of it.  Given that, is there any objection to adding an explicit
> BuildRequires to the spec, making it mandatory in the config
> process, and removing all traces of Lustre's internal readline
> implementation?  If not, I'll open a Jira ticket to do this.
> 
> - Patrick
> _______________________________________________
> lustre-devel mailing list
> lustre-devel at lists.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-03 18:57 ` Ned Bass
@ 2015-06-03 20:27   ` Patrick Farrell
  2015-06-03 20:57     ` Ned Bass
  2015-06-03 21:07     ` Simmons, James A.
  0 siblings, 2 replies; 10+ messages in thread
From: Patrick Farrell @ 2015-06-03 20:27 UTC (permalink / raw)
  To: lustre-devel

You say you just install the library and not the utils, but do you 
specifically build without the utils?  Is there some existing config 
option for that?  (Hoping to save myself some grepping...) Otherwise, 
I'll have to add in that option.

It also seems that readline-devel isn't available for the Intel Xeon Phi 
chips (or at least Cray doesn't have it in our build setup).

- Patrick

On 06/03/2015 01:57 PM, Ned Bass wrote:
> Hi Patrick,
>
> LLNL builds a stand-alone liblustreapi library for our BG/Q compute
> nodes, and readline isn't available there. Now, since we just install
> the library and not the utils we don't actually need readline. Perhaps
> rather than making the readline configurue check stricly mandatory, we
> could add a --disable-utils option which, if specified, would make
> readline optional.
>
> Thanks,
> Ned
>
> On Wed, Jun 03, 2015 at 01:32:05PM -0500, Patrick Farrell wrote:
>> Good afternoon,
>>
>> Cray has recently discovered that 'lfs getstripe' crashes with a
>> null pointer if it is not built with libreadline (Found in
>> 'readline-devel').
>>
>> When built without libreadline, Lustre uses its own implementation
>> of the readline components it needs.  (Look for "HAVE_LIBREADLINE"
>> in libcfs/libcfs/util/parser.c)  This is the source of the null
>> pointer.
>>
>> I think libreadline should be available on every platform we wish to
>> build Lustre on, so I'd rather not fix the broken internal version
>> of it.  Given that, is there any objection to adding an explicit
>> BuildRequires to the spec, making it mandatory in the config
>> process, and removing all traces of Lustre's internal readline
>> implementation?  If not, I'll open a Jira ticket to do this.
>>
>> - Patrick
>> _______________________________________________
>> lustre-devel mailing list
>> lustre-devel at lists.lustre.org
>> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-03 20:27   ` Patrick Farrell
@ 2015-06-03 20:57     ` Ned Bass
  2015-06-03 21:07     ` Simmons, James A.
  1 sibling, 0 replies; 10+ messages in thread
From: Ned Bass @ 2015-06-03 20:57 UTC (permalink / raw)
  To: lustre-devel

On Wed, Jun 03, 2015 at 03:27:45PM -0500, Patrick Farrell wrote:
> You say you just install the library and not the utils, but do you
> specifically build without the utils?  Is there some existing config
> option for that?  (Hoping to save myself some grepping...)
> Otherwise, I'll have to add in that option.

There's no such config option, I just manually perform the build steps
after configure. Something like this:

./configure --disable-server --disable-readline
cd lustre/utils
make CC=mpicc liblustreapi.a
<$BQQ_BIN_DIR>/gcc -shared -Wl,-soname,liblustreapi.so.0 -o liblustreapi.so.0 liblustreapi*.o l_ioctl.o kernel_user_comm.o

Kind of a hack, but we don't update it often so I haven't bothered to
add build system support.

Ned

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-03 20:27   ` Patrick Farrell
  2015-06-03 20:57     ` Ned Bass
@ 2015-06-03 21:07     ` Simmons, James A.
  2015-06-03 22:49       ` Ned Bass
  1 sibling, 1 reply; 10+ messages in thread
From: Simmons, James A. @ 2015-06-03 21:07 UTC (permalink / raw)
  To: lustre-devel

>You say you just install the library and not the utils, but do you 
>specifically build without the utils?  Is there some existing config 
>option for that?  (Hoping to save myself some grepping...) Otherwise, 
>I'll have to add in that option.
>
>It also seems that readline-devel isn't available for the Intel Xeon Phi 
>chips (or at least Cray doesn't have it in our build setup).

This is just papering over the real problem. The utilites should be using
getopt() instead. The only thing Parse does that is non standard is
an interactive command line. The only place I have ever used that is
for lnet selftest. Does lfs really need an interactive command line?
I think not.

- Patrick

On 06/03/2015 01:57 PM, Ned Bass wrote:
> Hi Patrick,
>
> LLNL builds a stand-alone liblustreapi library for our BG/Q compute
> nodes, and readline isn't available there. Now, since we just install
> the library and not the utils we don't actually need readline. Perhaps
> rather than making the readline configurue check stricly mandatory, we
> could add a --disable-utils option which, if specified, would make
> readline optional.
>
> Thanks,
> Ned
>
> On Wed, Jun 03, 2015 at 01:32:05PM -0500, Patrick Farrell wrote:
>> Good afternoon,
>>
>> Cray has recently discovered that 'lfs getstripe' crashes with a
>> null pointer if it is not built with libreadline (Found in
>> 'readline-devel').
>>
>> When built without libreadline, Lustre uses its own implementation
>> of the readline components it needs.  (Look for "HAVE_LIBREADLINE"
>> in libcfs/libcfs/util/parser.c)  This is the source of the null
>> pointer.
>>
>> I think libreadline should be available on every platform we wish to
>> build Lustre on, so I'd rather not fix the broken internal version
>> of it.  Given that, is there any objection to adding an explicit
>> BuildRequires to the spec, making it mandatory in the config
>> process, and removing all traces of Lustre's internal readline
>> implementation?  If not, I'll open a Jira ticket to do this.
>>
>> - Patrick
>> _______________________________________________
>> lustre-devel mailing list
>> lustre-devel at lists.lustre.org
>> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

_______________________________________________
lustre-devel mailing list
lustre-devel at lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-03 21:07     ` Simmons, James A.
@ 2015-06-03 22:49       ` Ned Bass
  2015-06-04 11:21         ` Dilger, Andreas
  0 siblings, 1 reply; 10+ messages in thread
From: Ned Bass @ 2015-06-03 22:49 UTC (permalink / raw)
  To: lustre-devel

On Wed, Jun 03, 2015 at 09:07:11PM +0000, Simmons, James A. wrote:
> >You say you just install the library and not the utils, but do you 
> >specifically build without the utils?  Is there some existing config 
> >option for that?  (Hoping to save myself some grepping...) Otherwise, 
> >I'll have to add in that option.
> >
> >It also seems that readline-devel isn't available for the Intel Xeon Phi 
> >chips (or at least Cray doesn't have it in our build setup).
> 
> This is just papering over the real problem. The utilites should be using
> getopt() instead. The only thing Parse does that is non standard is
> an interactive command line. The only place I have ever used that is
> for lnet selftest. Does lfs really need an interactive command line?
> I think not.

I concur. There a few lctl commands that can only be run today in the
interactive mode because they rely on earlier commands. For example,
"conn_list" requires that you first run "network". Such commands should
be updated to use sub-arguments rather than relying on previous
commands.

Ned

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-03 22:49       ` Ned Bass
@ 2015-06-04 11:21         ` Dilger, Andreas
  2015-06-04 17:37           ` Ned Bass
  0 siblings, 1 reply; 10+ messages in thread
From: Dilger, Andreas @ 2015-06-04 11:21 UTC (permalink / raw)
  To: lustre-devel

On 2015/06/03, 4:49 PM, "Ned Bass" <bass6@llnl.gov> wrote:

>On Wed, Jun 03, 2015 at 09:07:11PM +0000, Simmons, James A. wrote:
>> >You say you just install the library and not the utils, but do you
>> >specifically build without the utils?  Is there some existing config
>> >option for that?  (Hoping to save myself some grepping...) Otherwise,
>> >I'll have to add in that option.
>> >
>> >It also seems that readline-devel isn't available for the Intel Xeon
>>Phi 
>> >chips (or at least Cray doesn't have it in our build setup).
>> 
>> This is just papering over the real problem. The utilites should be
>>using
>> getopt() instead. The only thing Parse does that is non standard is
>> an interactive command line. The only place I have ever used that is
>> for lnet selftest. Does lfs really need an interactive command line?
>> I think not.
>
>I concur. There a few lctl commands that can only be run today in the
>interactive mode because they rely on earlier commands. For example,
>"conn_list" requires that you first run "network". Such commands should
>be updated to use sub-arguments rather than relying on previous
>commands.

This is handled by having a "command" named "--net" that runs the next
command (e.g. "conn_list") so that it can be run from the command-line.
That can definitely be replaced by getopt.  I don't think interactive mode
is used very much anymore, so would probably be ok to remove from lctl.

Cheers, Andreas
-- 
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-04 11:21         ` Dilger, Andreas
@ 2015-06-04 17:37           ` Ned Bass
  2015-06-04 17:47             ` Ned Bass
  0 siblings, 1 reply; 10+ messages in thread
From: Ned Bass @ 2015-06-04 17:37 UTC (permalink / raw)
  To: lustre-devel

On Thu, Jun 04, 2015 at 11:21:09AM +0000, Dilger, Andreas wrote:
> This is handled by having a "command" named "--net" that runs the next
> command (e.g. "conn_list") so that it can be run from the command-line.
> That can definitely be replaced by getopt.  I don't think interactive mode
> is used very much anymore, so would probably be ok to remove from lctl.

Cool, thanks. The --net option isn't covered in the lctl man page, but
it is in the online help. We'll need to close all those documentation
gaps when we gut interactive mode.

Ned

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-04 17:37           ` Ned Bass
@ 2015-06-04 17:47             ` Ned Bass
  2015-06-05 17:15               ` Dilger, Andreas
  0 siblings, 1 reply; 10+ messages in thread
From: Ned Bass @ 2015-06-04 17:47 UTC (permalink / raw)
  To: lustre-devel

On Thu, Jun 04, 2015 at 10:37:26AM -0700, Ned Bass wrote:
>
> Cool, thanks. The --net option isn't covered in the lctl man page, but
> it is in the online help. We'll need to close all those documentation
> gaps when we gut interactive mode.

Or better yet (getting off topic here) emulate git and have separate man
pages for each subcommand, and have 'lfs help <command>' display the
lfs-command man page.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [lustre-devel] Lustre and libreadline
  2015-06-04 17:47             ` Ned Bass
@ 2015-06-05 17:15               ` Dilger, Andreas
  0 siblings, 0 replies; 10+ messages in thread
From: Dilger, Andreas @ 2015-06-05 17:15 UTC (permalink / raw)
  To: lustre-devel

On 2015/06/04, 11:47 AM, "Ned Bass" <bass6@llnl.gov> wrote:

>On Thu, Jun 04, 2015 at 10:37:26AM -0700, Ned Bass wrote:
>>
>> Cool, thanks. The --net option isn't covered in the lctl man page, but
>> it is in the online help. We'll need to close all those documentation
>> gaps when we gut interactive mode.
>
>Or better yet (getting off topic here) emulate git and have separate man
>pages for each subcommand, and have 'lfs help <command>' display the
>lfs-command man page.

See https://jira.hpdd.intel.com/browse/LU-4315 for splitting up the lfs.1
and lctl.8 man pages.  That is the kind of project any number of users
could take on easily.

Cheers, Andreas
-- 
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-06-05 17:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-03 18:32 [lustre-devel] Lustre and libreadline Patrick Farrell
2015-06-03 18:57 ` Ned Bass
2015-06-03 20:27   ` Patrick Farrell
2015-06-03 20:57     ` Ned Bass
2015-06-03 21:07     ` Simmons, James A.
2015-06-03 22:49       ` Ned Bass
2015-06-04 11:21         ` Dilger, Andreas
2015-06-04 17:37           ` Ned Bass
2015-06-04 17:47             ` Ned Bass
2015-06-05 17:15               ` Dilger, Andreas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.