Skip to contentSkip to conversation

Lustre and libreadline

lustre-devel Patrick Farrell 3 participants 10 messages Jun 3, 2015 – Jun 5, 2015

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

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

Quoted 23 lines · Patrick Farrell

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

#2 lore raw

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

Quoted 36 lines · Ned Bass

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

Quoted 23 lines · Patrick Farrell

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

#3 lore raw
Quoted 4 lines · Patrick Farrell

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

#4 lore raw
In reply to Patrick Farrell
Quoted 7 lines

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

Quoted 9 lines · Ned Bass

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.

Quoted 27 lines

Thanks,
Ned

Quoted 23 lines · Patrick Farrell

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

#5 lore raw
Quoted 5 lines · James A.
Quoted 5 lines

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.

Quoted 8 lines
Quoted 2 lines

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

#6 lore raw
Quoted 17 lines · Ned Bass
Quoted 7 lines · James A.
Quoted 6 lines

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

Quoted 8 lines
Quoted 1 line

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.

Quoted 5 lines

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

Signature · 4 lines
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division
#7 lore raw
Quoted 4 lines · Andreas

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

#8 lore raw
Quoted 4 lines · Ned Bass

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.

#9 lore raw
Quoted 9 lines · Ned Bass
Quoted 4 lines · Ned Bass

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

Signature · 4 lines
Andreas Dilger

Lustre Software Architect
Intel High Performance Data Division