Tcl Source Code

View Ticket
Login
Ticket UUID: 219212
Title: bad load causes core dump
Type: Bug Created on: 2000-10-26 05:03:39
Submitter: nobody Assigned to: stwo
Subsystem: 40. Dynamic Loading Severity: Minor
Priority: 5 Medium Last modified: 2013-08-27 10:55:20
Status: Closed Closed by: jan.nijtmans
Resolution: Invalid Closed on: 2013-08-27 10:55:20
Version: final: 8.2.3
Description:
OriginalBugID: 3750 Bug
Version: 8.2.3
SubmitDate: '1999-12-01'
LastModified: '2000-09-06'
Severity: SER
Status: Assigned
Submitter: key
ChangedBy: hobbs
RelatedBugIDs: 3728
OS: Linux-Red Hat
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


package require java causes error in server interpreter and core dump in wish82 - 

Stack trace: 

"load libtclblend.so" failed:
 couldn't load file "libtclblend.so": libjava.so: cannot open shared object file: No such file or directory
    while executing
"error "\"load $tclblend_shlib\" failed:\n $errMsg""
    (procedure "loadtclblend" line 386)
    invoked from within
"loadtclblend /opt/scriptics/ScripticsConnect1.1b/linux-ix86/lib/tclblend"
    ("package ifneeded" script)
    invoked from within
"package require java"

Start a wish interactive interpretor on linux and enter "package requir java" and it will core dump 



the problem with this bug is that the failed package require is coring.
the ldlibrary path is wrong so the package require is failing.  but it shouldn't core.
--
The problem appears to be on the side of the loaded dll coring,
taking Tcl with it, not Tcl itself.  It may be possible to save
ourselves (a SEGV signal handler while loading dlls?) in such
a situation. 
-- 02/05/2000 hobbs
User Comments:
dkf added on 2001-01-10 22:20:51:
It is not generally possible to do a lot if a loaded library crashes out, since one of the things it might have done is to trash memory as part of the process.  :^(

OTOH, it may be that there are tweaks that can be done to the library this problem is reported against that can help it recover from a failed load more gracefully.  This isn't a matter for the core though, as that recovers from a failed load *if* it can.  But if the ordure has hit the bulk air movement device, recovery just can't necessarily be assured.

It might also depend on how the library loader operates.  If the library being loaded depends on another that can't be found, how does the system respond?  In this case, it looks like something nasty happens (and trapping SIGSEGV is unlikely to help, as who knows what bad pointers are hanging around, and a general trap of that signal will just hide trouble.  Ack!)

I'm minded to mark this bug as being unfixable (is that Invalid or Wont Fix?)

kennykb added on 2001-02-09 01:48:15:
Anyone know the procedure by which we could transfer this item to be a bug against TclBlend?  The pointer smash happened there, rather than in the Core.

I'm with Donal, that this bug should be a "no fix" in the Core.

dgp added on 2001-02-09 23:53:07:
To transfer a bug from one project to another, you must
be an Admin of both projects.

Projects Tcl and TclJava (includes TclBlend) have Mo
DeJong (mdejong) as a common Admin.

Mark this bug Invalid.  Then assign it to mdejong, so 
Mo can move it to TclJava and re-open it there.

kennykb added on 2001-02-10 00:29:58:
Since this problem was with TclBlend_Init dropping core, Don Porter suggested that I mark this bug 'Invalid' and reassign it to Mo so that he can reopen it in the correct project.  I'm doing so.

mdejong added on 2001-02-16 16:06:55:
Humm, I am not really sure this is a Tcl Blend problem.
It seems more like a runtime linker issue. The problem
here is that when libtclblend.so is loaded rld goes
looking for other libs that it might need. If those
other libs are not found, it seems to blow up
on the user's system.

I know this crash does not happen on all systems
because I get an error message from rld
on my Linux box. I think we need to create
a test case for this error and add it to
the standard Tcl test suite. This might be
a glibc version thing, I don't know off hand.