bin/setup bug on Linux

B

blindcoder

Guest
Hi.

I had some trouble getting bin/setup to run.
I installed to a directory in my $HOME ($HOME/privater) and wanted to start the setup program from that directory, which promptly informed me that it couldn't find the setup.config file. After using strace I found that the program first does a chdir to ~/.privater100 and only _then_ tries to open "setup.config". If it can't find it there, it statically searches a path in /usr/local/somewhere. If it can't find it there, it simply fails.
Same goes for vegastrike.config.
Only after a little symlink magic was I able to use the setup tool.

What about simply creating a new file with default values?
 
I had no luck in running the setup tool al all (it did in 0,9 though)... It just segfaults every time with fresh install... heres the output if you will (shortened);

samppa/part2/privateer/bin(997)(4) > strace setup
execve("./setup", ["setup"], [/* 80 vars */]) = 0
uname({sys="Linux", node="kotiteatteri.fi", ...}) = 0
brk(0) = 0x81ba000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=86182, ...}) = 0
old_mmap(NULL, 86182, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\32\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=9160, ...}) = 0
old_mmap(NULL, 12008, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002e000
old_mmap(0x40030000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x40030000
close(3) = 0
open("/usr/lib/libstdc++-libc6.2-2.so.3", O_RDONLY) = 3

read(4, "O.ISO8859-1\niso8859-1/XLC_LOCALE"..., 4096) = 4096
read(4, "ISO8859-2\niso8859-2/XLC_LOCALE \t"..., 4096) = 4096
read(4, "\tes_CO.UTF-8\nen_US.UTF-8/XLC_LOC"..., 4096) = 4096
read(4, "F-8/XLC_LOCALE\tuz_UZ.UTF-8@Cyrl\n"..., 4096) = 4096
close(4) = 0
munmap(0x40018000, 4096) = 0
access("/usr/X11R6/lib/X11/locale/C/XLC_LOCALE", R_OK) = 0
open("/usr/X11R6/lib/X11/locale/C/XLC_LOCALE", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=772, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(4, "# $Xorg: C,v 1.3 2000/08/17 19:"..., 4096) = 772
read(4, "", 4096) = 0
close(4) = 0
munmap(0x40018000, 4096) = 0
open("/usr/X11R6/lib/X11/locale/locale.alias", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=39467, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(4, "#\t$TOG: locale.alias /main/33 19"..., 4096) = 4096
read(4, "n\t\t\t\t\t\ten_US.ISO8859-1\nen@euro\t\t"..., 4096) = 4096
read(4, "fi@euro\t\t\t\tfi_FI.ISO8859-15\nfi_F"..., 4096) = 4096
read(4, "_GL.ISO-8859-15\t\t\t\tkl_GL.ISO8859"..., 4096) = 4096
read(4, "sp_YU.ISO8859-5\nsq\t\t\t\t\t\tsq_AL.IS"..., 4096) = 4096
read(4, ":\t\t\t\t\tar_KW.UTF-8\nar_LB:\t\t\t\t\tar_"..., 4096) = 4096
read(4, "ISO-8859-1:\t\t\t\t\ten_NZ.ISO8859-1\n"..., 4096) = 4096
read(4, ":\t\t\t\t\tfr_CH.ISO8859-1\nfr_CH.ISO-"..., 4096) = 4096
read(4, "O-8859-13:\t\t\t\tlt_LT.ISO8859-13\nl"..., 4096) = 4096
read(4, ".ISO-8859-1:\t\t\t\t\tsv_FI.ISO8859-1"..., 4096) = 2603
read(4, "", 4096) = 0
close(4) = 0
munmap(0x40018000, 4096) = 0
open("/usr/X11R6/lib/X11/locale/locale.dir", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=34074, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(4, "#\t$TOG: locale.dir /main/13 1998"..., 4096) = 4096
read(4, "O.ISO8859-1\niso8859-1/XLC_LOCALE"..., 4096) = 4096
read(4, "ISO8859-2\niso8859-2/XLC_LOCALE \t"..., 4096) = 4096
read(4, "\tes_CO.UTF-8\nen_US.UTF-8/XLC_LOC"..., 4096) = 4096
read(4, "F-8/XLC_LOCALE\tuz_UZ.UTF-8@Cyrl\n"..., 4096) = 4096
close(4) = 0
munmap(0x40018000, 4096) = 0
access("/usr/X11R6/lib/X11/locale/C/XLC_LOCALE", R_OK) = 0
open("/usr/X11R6/lib/X11/locale/C/XLC_LOCALE", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=772, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(4, "# $Xorg: C,v 1.3 2000/08/17 19:"..., 4096) = 772
read(4, "", 4096) = 0
close(4) = 0
munmap(0x40018000, 4096) = 0
open("/usr/X11R6/lib/X11/locale/compose.dir", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=29327, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(4, "#\t$TOG: locale.dir /main/13 1998"..., 4096) = 4096
read(4, "-1/Compose\tes_SV.ISO8859-1\niso88"..., 4096) = 4096
read(4, "VN.TCVN\nvi_VN.viscii/Compose\tvi_"..., 4096) = 4096
read(4, "F-8/Compose\tli_NL.UTF-8\nen_US.UT"..., 4096) = 4096
close(4) = 0
munmap(0x40018000, 4096) = 0
access("/usr/X11R6/lib/X11/locale/C/Compose", R_OK) = 0
open("/usr/X11R6/lib/X11/locale/C/Compose", O_RDONLY) = 4
close(4) = 0
open("/usr/X11R6/lib/X11/locale/compose.dir", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=29327, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(4, "#\t$TOG: locale.dir /main/13 1998"..., 4096) = 4096
read(4, "-1/Compose\tes_SV.ISO8859-1\niso88"..., 4096) = 4096
read(4, "VN.TCVN\nvi_VN.viscii/Compose\tvi_"..., 4096) = 4096
read(4, "F-8/Compose\tli_NL.UTF-8\nen_US.UT"..., 4096) = 4096
close(4) = 0
munmap(0x40018000, 4096) = 0
access("/usr/X11R6/lib/X11/locale/C/Compose", R_OK) = 0
open("/usr/X11R6/lib/X11/locale/C/Compose", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(4, "", 4096) = 0
close(4) = 0
munmap(0x40018000, 4096) = 0
getuid32() = 502
open("/etc/passwd", O_RDONLY) = 4
fcntl64(4, F_GETFD) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=1375, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1375
close(4) = 0
munmap(0x40018000, 4096) = 0
lstat64("/usr/share/themes/Galaxy/gtk/gtkrc", {st_mode=S_IFREG|0644, st_size=2182, ...}) = 0
open("/usr/share/themes/Galaxy/gtk/gtkrc", O_RDONLY) = 4
read(4, "style \"galaxy-default\"\n{\n# Gt"..., 4000) = 2182
open("/usr/lib/gtk/themes/engines/libgalaxy.so", O_RDONLY) = 5
close(5) = 0
open("/usr/lib/gtk/themes/engines/libgalaxy.so", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\31"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=60660, ...}) = 0
old_mmap(NULL, 63760, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40018000
old_mmap(0x40027000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0xe000) = 0x40027000
close(5) = 0
open("/etc/ld.so.cache", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=86182, ...}) = 0
old_mmap(NULL, 86182, PROT_READ, MAP_PRIVATE, 5, 0) = 0x401f3000
close(5) = 0
open("/usr/lib/libgdk_pixbuf.so.2", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360>\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=85680, ...}) = 0
old_mmap(NULL, 88776, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x40209000
old_mmap(0x4021c000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x12000) = 0x4021c000
close(5) = 0
open("/usr/lib/libgtk-1.2.so.0", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\33"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=1361936, ...}) = 0
old_mmap(NULL, 1365192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x4021f000
old_mmap(0x40365000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x146000) = 0x40365000
old_mmap(0x4036c000, 1224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4036c000
close(5) = 0
open("/usr/lib/libgdk-1.2.so.0", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\241\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=236976, ...}) = 0
old_mmap(NULL, 236660, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x4036d000
old_mmap(0x403a6000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x39000) = 0x403a6000
close(5) = 0
open("/usr/lib/libgmodule-1.2.so.0", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\v\0\000"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0644, st_size=8740, ...}) = 0
old_mmap(NULL, 11840, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x403a7000
old_mmap(0x403a9000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x1000) = 0x403a9000
close(5) = 0
open("/usr/lib/libglib-1.2.so.0", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200b\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=150092, ...}) = 0
old_mmap(NULL, 153796, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x403aa000
old_mmap(0x403cf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x24000) = 0x403cf000
close(5) = 0
open("/usr/X11R6/lib/libXi.so.6", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\23"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=28176, ...}) = 0
old_mmap(NULL, 31392, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x403d0000
old_mmap(0x403d7000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0x6000) = 0x403d7000
close(5) = 0
open("/usr/X11R6/lib/libXext.so.6", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000)\0\000"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=55856, ...}) = 0
old_mmap(NULL, 55124, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x403d8000
old_mmap(0x403e5000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0xd000) = 0x403e5000
close(5) = 0
open("/usr/X11R6/lib/libX11.so.6", O_RDONLY) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\23"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0755, st_size=920112, ...}) = 0
old_mmap(NULL, 924408, PROT_READ|PROT_EXEC, MAP_PRIVATE, 5, 0) = 0x403e6000
old_mmap(0x404c5000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 5, 0xde000) = 0x404c5000
close(5) = 0
munmap(0x401f3000, 86182) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
 
I might add to that, that I REALLY enjoyed the 0.9 version and that I'd just like to edit prefs so that bases would look full screen, music would be off and my gamepad would accept a few keycommands, thats all. But editing vegastrike.conf seems to make no difference, hows that???

Am i just plain stupid with 4 years of CS-college and linux?
 
looks like you're running X.org
I had major trouble with X.org in my livesystem, applications would crash with similiar errors. I suspect a bug in X.org since everything runs fine in XFree86. Btw, the latest release .2 of X.org _is_ buggy wrt. at least the interface to the nvidia driver. I recommend sticking to .1 or XFree86.
 
blindcoder said:
looks like you're running X.org
I had major trouble with X.org in my livesystem, applications would crash with similiar errors. I suspect a bug in X.org since everything runs fine in XFree86. Btw, the latest release .2 of X.org _is_ buggy wrt. at least the interface to the nvidia driver. I recommend sticking to .1 or XFree86.

Thanks for the quick reply... Nevertheless, I'm using the plain old Xfree4 that came with the mandrake 10 :>

Could this bug relate to Nvidia drivers? Never thought of that....
 
sure, nvidia is always at fault :) *just kidding*

what's strange is that it segfaults at an munmap call. This suggest a buffer overflow and/or unchecked error. Honestly, judging from the rest of setups behaviour, that wouldn't surprise me :/

Let's start at the beginning. is $DISPLAY set correctly? Do you have permission to access the X-Server? Could you paste an ltrace output?
 
blindcoder said:
sure, nvidia is always at fault :) *just kidding*

what's strange is that it segfaults at an munmap call. This suggest a buffer overflow and/or unchecked error. Honestly, judging from the rest of setups behaviour, that wouldn't surprise me :/

Let's start at the beginning. is $DISPLAY set correctly? Do you have permission to access the X-Server? Could you paste an ltrace output?

Seems the beginnings is the right place for me ehe :>

echo $DISPLAY
:0

Thats it, and I have no clue as what it means. I do have the rights to Xserver and all the other (SDL etc) games work fawlesly.
 
:0 means to use the UNIX Sockets to connect to the first X Server running on the machine you're currently on. So far that's correct.
Can you place the ltrace output here?
 
blindcoder said:
:0 means to use the UNIX Sockets to connect to the first X Server running on the machine you're currently on. So far that's correct.
Can you place the ltrace output here?

I have the same problem as samppa72.
here's my ltrace output (the last view lines before the SEGFAULT.):
> ltrace -d -S ./setup
[....]
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_read [3])
SYS_read(6, <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_read [3])
<... SYS_read resumed> "\177ELF\001\001\001", 512) = 512
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_fstat64 [197])
SYS_fstat64(6, 0xbfffdf8c, 0x400157b8, 0x400159e0, 0 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_fstat64 [197])
<... SYS_fstat64 resumed> ) = 0
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_mmap [90])
SYS_mmap(0xbfffde84, 6, 0x400157b8, 0xbfffdec0, 0xbfffdef0 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_mmap [90])
<... SYS_mmap resumed> ) = 0x403b0000
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_mmap [90])
SYS_mmap(0xbfffde84, 48865, 0x400157b8, 0xbfffded8, 6 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_mmap [90])
<... SYS_mmap resumed> ) = 0x403bc000
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_close [6])
SYS_close(6 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_close [6])
<... SYS_close resumed> ) = 0
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_access [33])
SYS_access(0x40012584, 0, 0x400157b8, 0, 524288 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_access [33])
<... SYS_access resumed> ) = -2
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_open [5])
SYS_open("/usr/X11R6/lib/libX11.so.6", 0, 027777775322 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_open [5])
<... SYS_open resumed> ) = 6
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_read [3])
SYS_read(6, <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_read [3])
<... SYS_read resumed> "\177ELF\001\001\001", 512) = 512
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_fstat64 [197])
SYS_fstat64(6, 0xbfffdf70, 0x400157b8, 0x400159e0, 0 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_fstat64 [197])
<... SYS_fstat64 resumed> ) = 0
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_mmap [90])
SYS_mmap(0xbfffde68, 6, 0x400157b8, 0xbfffdea0, 0xbfffded0 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_mmap [90])
<... SYS_mmap resumed> ) = 0x403bd000
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_mmap [90])
SYS_mmap(0xbfffde68, 776424, 0x400157b8, 0xbfffdeb8, 6 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_mmap [90])
<... SYS_mmap resumed> ) = 0x4047b000
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_close [6])
SYS_close(6 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_close [6])
<... SYS_close resumed> ) = 0
DEBUG: process_event.c:85: process_event(): event: syscall (SYS_munmap [91])
SYS_munmap(0x401f6000, 55787 <unfinished ...>
DEBUG: process_event.c:89: process_event(): event: sysret (SYS_munmap [91])
<... SYS_munmap resumed> ) = 0
DEBUG: process_event.c:73: process_event(): event: signal (SIGSEGV [11])
--- SIGSEGV (Segmentation fault) ---
DEBUG: process_event.c:81: process_event(): event: exit signal (SIGSEGV [11])
+++ killed by SIGSEGV +++
DEBUG: process_event.c:135: remove_proc(): Removing pid 10791

DEBUG: wait_for_something.c:30: wait_for_something(): No more children
 
Back
Top