running a command in nALFS segfaults,but not manually

Kevin P. Fleming kpfleming at linuxfromscratch.org
Tue Aug 24 18:32:31 PDT 2004


Gerard Beekmans wrote:
> <execute base="/usr/lib/firefox-&firefox-version;"
> 	command="MOZILLA_FIVE_HOME=/usr/lib/firefox-&firefox-version;
> 	./regxpcom"/>

Is that extra whitespace in the profile, or just the result of 
line-wrapping?

> When I run that myself inside chroot:
> 
> root at lorien/usr/src# cd /usr/lib/firefox-0.9.3/
> root at lorien/usr/lib/firefox-0.9.3#
> MOZILLA_FIVE_HOME=/usr/lib/firefox-0.9.3 ./regxpcom
> root at lorien/usr/lib/firefox-0.9.3# echo $?
> 0

Are you also running inside a chroot in the profile? If so, your 
environment will have been wiped, but that would not necessarily be true 
when running manually. May not be relevant, though.

> open("/usr/lib/firefox-0.9.3/components/compreg.dat",
> O_RDONLY|O_LARGEFILE) = 7
> stat64("/usr/lib/firefox-0.9.3/components/compreg.dat",
> {st_mode=S_IFREG|0644, st_size=131797, ...}) = 0
> mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0x40369000
> read(7, "Generated File. Do not edit.\n\n[H"..., 131797) = 131797
> brk(0)                                  = 0x8073000
> brk(0x8094000)                          = 0x8094000
> close(7)                                = 0
> munmap(0x40369000, 135168)              = 0
> access("/usr/lib/firefox-0.9.3/.autoreg", F_OK) = -1 ENOENT (No such
> file or directory)
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> 
> Not very helpful. The missing .autoreg seems harmless because that same
> message shows up when I run ./regxpcom outside of nALFS but it doesn't
> segfault then.

Just to be clear here, was the strace/regxpcom process itself killed by 
signal 11 here, or the nALFS child process? It appears that regxpcom 
itself died, which would mean that the segmentation fault is not 
occurring inside nALFS code, but in the child process.

Here is an ugly, dirty, nasty trick that I've used before... Have nALFS run:

/bin/bash < /dev/tty7 > /dev/tty7 2> /dev/tty7

in the profile, which will you give you a shell prompt on vc7 inside the 
nALFS child process environment. If you run regxpcom from there you may 
be able to glean more details (especially if you can run regxpcom under 
gdb).



More information about the alfs-discuss mailing list