Tkdesk Segmentation Fault
Hi,
In RH 7.3 the program tkdesk will not open any longer.
Only the message 'Segmentation fault' shows up immediately after giving the command tkdesk.
Why would that be and how could it be corrected?
Thanks & regards
Signature · 7 lines
Peter - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 8 lines · Peter
Hi,
In RH 7.3 the program tkdesk will not open any longer.
Only the message 'Segmentation fault' shows up immediately after giving the command tkdesk.
Why would that be and how could it be corrected?
How basic is your question, Peter? I'll assume fairly basic.
A segfault occurs when a process attempts to access a location in memory that has not been assigned to it by the kernel. I don't know all the reasons a process may segfault (or maybe I do, but in that case I don't know that I know), but the ones I know of are --
a programming error in the application (for example, attempting to
read or write to an element of an array greater than the size of the array)
a programming error in a shared library that the application uses
a hardware problem, typically bad RAM, that causes a memory
address to be corrupted
a swap-space problem, causing an error similar to the hardware
(RAM) problem above
Each source has a distinct (and, I trust, obvious, though not trivial) solution.
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 4 lines · Peter
Only the message 'Segmentation fault' shows up immediately after giving the command tkdesk.
Why would that be and how could it be corrected?
Inspect the core file using gdb:
% gdb tkdesk ./core
Or use strace:
$ strace tkdesk
And see if you can figure where it crashed. If yes, then you should pro- bably know why, too.
Signature · 6 lines
http://gnewtellium.sourceforge.net MP3 is not a crime. - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Thanks!
Quoted 4 lines · Peter
Quoted 4 lines
Only the message 'Segmentation fault' shows up immediately after giving the command tkdesk.
Why would that be and how could it be corrected?
I have to add from RH5.2 thru RH7.2 tkdesk always opened flawlessly. It is only now with RH7.3 that I have the problem to which I have (foolishly) upgraded a few days ago.
Ray, my guess is that is has something to do with the new libraries. How would I find out which one. ldd tkdesk gives "not a dynamic executable". I still have RH6.2 running and could transfer the libraries from there.
If I try to re-./.configure I get error:
checking version of Tcl/Tk... 8.3/8.3
TkDesk requires Tcl/Tk versions 7.5/4.1, 7.6/4.2., or 8.0. Older versions are unlikely to work, while newer ones are not yet supported
So I copied Tcl/Tk...8.0 from RH6.2 over to RH7.3 and I still get the same error.
Quoted 2 lines · [email protected] said:
Inspect the core file using gdb:
% gdb tkdesk ./core
There is no core file created.
Quoted 2 lines · [email protected] said:
Or use strace:
$ strace tkdesk
This is the tail of the strace output:mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40
016000read(4, "#\t$Xorg: locale.dir,v 1.3 2000/0"..., 4096) = 4096 read(4, "LOCALE\t\t\tfr_BE.ISO8859-15\niso885"..., 4096) = 4096 read(4, ".TCVN\nvi_VN.viscii/XLC_LOCALE\t\tv"..., 4096) = 4096 read(4, "\t\t\tlv_LV.UTF-8\nen_US.UTF-8/XLC_L"..., 4096) = 4096
close(4) = 0munmap(0x40016000, 4096) = 0open("/usr/X11R6/lib/X11/locale/C/XI18N_OBJS", O_RDONLY) = 4 fstat64(4, {st_dev=makedev(22, 67), st_ino=451076, st_mode=S_IFREG|0444, st_nlin
k=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=333, st_atime=200
2/11/06-09:11:05, st_mtime=2002/04/19-11:11:08, st_ctime=2002/11/03-11:24:28}) =
0mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40
016000read(4, "# CATEGORY(XLC|XIM|OM)\tSHARED_LI"..., 4096) = 333
read(4, "", 4096) = 0 close(4) = 0 munmap(0x40016000, 4096) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
It's Greek for me.
Regards
Signature · 7 lines
Peter - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 7 lines · Peter
Quoted 1 line · Peter
Quoted 1 line
Only the message 'Segmentation fault' shows up immediately after
giving the
Quoted 3 lines
Quoted 3 lines
command tkdesk.
Why would that be and how could it be corrected?
Quoted 7 lines
I have to add from RH5.2 thru RH7.2 tkdesk always opened flawlessly. It is only now with RH7.3 that I have the problem to which I have (foolishly) upgraded a few days ago.
Ray, my guess is that is has something to do with the new libraries. How would I find out which one. ldd tkdesk gives "not a dynamic executable". I still have RH6.2 running and could transfer the libraries from there.
Peter -- I have absolutely no familiarity with tkdesk, sso all these comments are based on my more general understanding of Linux systems.
From the ldd response, I'd infer that it is a script rather than an executable, presumably an tcl script from the beginning of its name. You might want to ldd tcl (or whatever the right name is -- see what interpreter the tkdesk script is invoking on its shebang line). But Tcl itself *seems* (I'm not certain because I do not have it installed) to depend only on libc6, and I'd be surprised if RH's install of libc6 is buggy (or its bugs would show up everywhere, this lib being so central to all apps).
You might also want to make sure that even after you install TCL 8.0, tkdesk uses it rather then the more recent version of Tcl that RH has installed.
As to the strace output you included, I can pretty much read it, but I don't see where or why it is segfaulting. Perhaps whoever suggested using strace will be better able to spot the exact problem than I am. The last statement executed -- the munmap -- appears correctly to be releasing the 4096 bytes of memory that were allocated by mmap a few lines earlier, and the several reads right before it look OK too. So I'm missing it, whatever it is. Sorry.
Quoted 48 lines
If I try to re-./.configure I get error:
checking version of Tcl/Tk... 8.3/8.3TkDesk requires Tcl/Tk versions 7.5/4.1, 7.6/4.2., or 8.0. Older versions are unlikely to work, while newer ones are not yet supported
So I copied Tcl/Tk...8.0 from RH6.2 over to RH7.3 and I still get the same error.
Quoted 2 lines · [email protected] said:
Inspect the core file using gdb:
% gdb tkdesk ./coreThere is no core file created.
Quoted 2 lines · [email protected] said:
Or use strace:
$ strace tkdeskThis is the tail of the strace output:
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x40
016000read(4, "#\t$Xorg: locale.dir,v 1.3 2000/0"..., 4096)= 4096read(4, "LOCALE\t\t\tfr_BE.ISO8859-15\niso885"..., 4096)= 4096read(4, ".TCVN\nvi_VN.viscii/XLC_LOCALE\t\tv"..., 4096)= 4096read(4, "\t\t\tlv_LV.UTF-8\nen_US.UTF-8/XLC_L"..., 4096)= 4096
close(4) = 0munmap(0x40016000, 4096)= 0open("/usr/X11R6/lib/X11/locale/C/XI18N_OBJS", O_RDONLY)= 4 fstat64(4, {st_dev=makedev(22, 67), st_ino=451076, st_mode=S_IFREG|0444,st_nlin
k=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=333, st_atime=200
2/11/06-09:11:05, st_mtime=2002/04/19-11:11:08, st_ctime=2002/11/03-11:24:28}) =
0mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x40
016000read(4, "# CATEGORY(XLC|XIM|OM)\tSHARED_LI"..., 4096)= 333read(4, "", 4096) = 0 close(4) = 0 munmap(0x40016000, 4096) = 0killed by SIGSEGV +++ renamed from SIGSEGV (Segmentation fault) --- +0
-0
Quoted 1 line
It's Greek for me.
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 5 lines · Peter
Quoted 2 lines · [email protected] said:
Inspect the core file using gdb:
% gdb tkdesk ./coreThere is no core file created.
% ulimit -c 1000000
Rerun TkDesk and let it crash. You should have a core file now.
killed by SIGSEGV +++
Quoted 31 lines
Quoted 2 lines · [email protected] said:
Or use strace:
$ strace tkdeskThis is the tail of the strace output:
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x40
016000read(4, "#\t$Xorg: locale.dir,v 1.3 2000/0"..., 4096)= 4096read(4, "LOCALE\t\t\tfr_BE.ISO8859-15\niso885"..., 4096)= 4096read(4, ".TCVN\nvi_VN.viscii/XLC_LOCALE\t\tv"..., 4096)= 4096read(4, "\t\t\tlv_LV.UTF-8\nen_US.UTF-8/XLC_L"..., 4096)= 4096
close(4) = 0munmap(0x40016000, 4096)= 0open("/usr/X11R6/lib/X11/locale/C/XI18N_OBJS", O_RDONLY)= 4 fstat64(4, {st_dev=makedev(22, 67), st_ino=451076, st_mode=S_IFREG|0444,st_nlin
k=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=333, st_atime=200
2/11/06-09:11:05, st_mtime=2002/04/19-11:11:08, st_ctime=2002/11/03-11:24:28}) =
0mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)=0x40
016000read(4, "# CATEGORY(XLC|XIM|OM)\tSHARED_LI"..., 4096)= 333read(4, "", 4096) = 0 close(4) = 0 munmap(0x40016000, 4096) = 0killed by SIGSEGV +++ renamed from SIGSEGV (Segmentation fault) --- +0
-0
It's probably a parsing error. The script opens various files (such as /usr/X11R6/lib/X11/locale/C/XI18N_OBJS) and tries to read them. I guess (but that is just a guess) your upgrade from RedHat 7.1 to RedHat 7.3 had as result to change the format/contents of these files, hence TkDesk can't parse them and segfaults (if this is the case, it shouldn't happen if TkDesk was properly programmed).
You'll find more if you inspect the core file with gdb (use the command 'where' to find where it crashed).
Elias
Signature · 6 lines
http://gnewtellium.sourceforge.net MP3 is not a crime. - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs