Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-12-12
09:20 • Closed ticket [2325190fff]: "expected to create a new entry for object map&... artifact: 5357986d16 user: sf-robot
2008-11-27
13:55 • Pending ticket [2325190fff]. artifact: 25a9644593 user: dgp
13:31 • Ticket [2325190fff]: 4 changes artifact: 31dac64b87 user: dgp
2008-11-25
06:32 • Ticket [2325190fff]: 4 changes artifact: 2eae2707a7 user: sdeasey
05:36 • Ticket [2325190fff]: 4 changes artifact: a301f1fc2a user: dgp
05:25 • Ticket [2325190fff]: 4 changes artifact: 8e49bf5a51 user: dgp
05:11 • Ticket [2325190fff]: 1 change artifact: fca54b9d93 user: dgp
05:10 • Ticket [2325190fff]: 4 changes artifact: 081b9821af user: dgp
05:04 • Ticket [2325190fff]: 4 changes artifact: d9efd5e650 user: sdeasey
05:00 • Ticket [2325190fff]: 4 changes artifact: 82ea5aca70 user: dgp
04:50 • Ticket [2325190fff]: 4 changes artifact: f50da2045f user: dgp
04:35 • Ticket [2325190fff]: 4 changes artifact: 909539d796 user: sdeasey
2008-11-23
02:16 • Ticket [2325190fff]: 4 changes artifact: d0aaf7c394 user: sdeasey
01:17 • Ticket [2325190fff]: 7 changes artifact: 6304224762 user: dgp
2008-11-22
06:20 • New ticket [2325190fff]. artifact: c1835e628b user: sdeasey

"expected to create a new entry for object map" w/mem debug

Closed / Duplicate2325190fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-11-22 06:20:45
Naviserver fails in early startup with the message:

"expected to create a new entry for object map"

when compiled against tcl8.5.5 and --enable-symbols=mem.  It works fine with just --enable-symbols.

It works fine either way with tcl8.4.19.

Here's a backtrace:

Fatal: expected to create new entry for object map
#0  0x00110416 in __kernel_vsyscall ()
#1  0x00b42660 in raise () from /lib/libc.so.6
#2  0x00b44028 in abort () from /lib/libc.so.6
#3  0x00144f18 in Panic (fmt=0x2b0760 "expected to create new entry for object map") at log.c:617
#4  0x0025fec7 in Tcl_PanicVA (format=0x2b0760 "expected to create new entry for object map", 
    argList=0xbfd92824 "") at
/home/sd/src/tcl8.5.5/unix/../generic/tclPanic.c:93
#5  0x0025ffca in Tcl_Panic (format=0x2b0760 "expected to create new entry for object map")
    at /home/sd/src/tcl8.5.5/unix/../generic/tclPanic.c:132
#6  0x0025c7b6 in TclDbInitNewObj (objPtr=0x95f1220) at
/home/sd/src/tcl8.5.5/unix/../generic/tclObj.c:637
#7  0x0024b919 in Tcl_DbNewListObj (objc=1, objv=0xbfd92890, 
    file=0x2ac234 "/home/sd/src/tcl8.5.5/unix/../generic/tclFileName.c",
line=787)
    at /home/sd/src/tcl8.5.5/unix/../generic/tclListObj.c:239
#8  0x00227d72 in Tcl_FSJoinToPath (pathPtr=0x961eb50, objc=0, objv=0x0)
    at /home/sd/src/tcl8.5.5/unix/../generic/tclFileName.c:787
#9  0x0026639d in SetFsPathFromAny (interp=0x0, pathPtr=0x961eb50)
    at /home/sd/src/tcl8.5.5/unix/../generic/tclPathObj.c:2441
#10 0x00265e4b in TclFSSetPathDetails (pathPtr=0x961eb50,
fsRecPtr=0x95ee640, clientData=0x0)
    at /home/sd/src/tcl8.5.5/unix/../generic/tclPathObj.c:2203
#11 0x0024a1c3 in Tcl_FSGetFileSystemForPath (pathPtr=0x961eb50)
    at /home/sd/src/tcl8.5.5/unix/../generic/tclIOUtil.c:4437
#12 0x00248a63 in Tcl_FSGetCwd (interp=0x0) at
/home/sd/src/tcl8.5.5/unix/../generic/tclIOUtil.c:2736
#13 0x00148603 in SetCwd (path=0x962f3c8 "/home/sd/ns-scratch-hg/tests")
at nsmain.c:1063
#14 0x00147c24 in Ns_Main (argc=8, argv=0xbfd92d04, initProc=0x8048636
<ServerInit>) at nsmain.c:504
#15 0x0804862c in main (argc=Cannot access memory at address 0x5785
) at main.c:64


Does this look like my bug or something in Tcl?
dgpplain2008-11-23 01:17:14
Is this a new failure in 8.5.5?
Did earlier 8.5.* patchlevels work
all right, or are they untested?
sdeaseyplain2008-11-23 02:16:49
I used to test against 8.5 before it was released but it was taking a while so it dropped off my radar. It definitely worked at one point, as I always test with --enable-symbols=mem.

I just grabbed the 8.5.0 tarball -- same problem.

Looking around I see I have 8.5a5 still installed, whos tcl.h has this tag:

  RCS: @(#) $Id: tcl.h,v 1.214 2006/08/18 07:45:31 das Exp $

Same problem  :-(


Hmm, now that I think about it, I think this is why I stopped testing against 8.5 cvs. Some where among the alpha releases it started breaking and I just assumed it was something temporary that would be worked out soon, and then I forgot about it. But this was two years ago...
sdeaseyplain2008-11-25 04:35:51
The change in behaviour first appeared on 2003-07-21 when Mo DeJong checked in some changes to catch Tcl objects moving between interps with mem debugging enabled.

Here is a minimal failing program:

int
main(int argc, char **argv)
{
    Tcl_Interp *interp;
    Tcl_Obj    *objPtr;

    Tcl_FindExecutable(argv[0]);

    objPtr = Tcl_NewObj();
    Tcl_DecrRefCount(objPtr);

    interp = Tcl_CreateInterp();

    /* Aborted: expected to create new entry for object map */

    return 0;
}
dgpplain2008-11-25 04:50:30
Great timing.  Just as I open this for
a serious look, you drop lots of good
data.  Thanks!

Now the bad news.  Using your demo program
I can't reproduce the problem.

What details are you leaving out?  Thread-enabled?
64-bit platform?  Moon phase?
dgpplain2008-11-25 05:00:10
ok the panic message you report is
only in a thread-enabled build, so
trying that config next...

This is looking familiar as well...
sdeaseyplain2008-11-25 05:04:13
Yes, threaded (isn't that the default these days), like this:

--enable-threads --enable-symbols=mem

This is on a modern 32bit Linux.
dgpplain2008-11-25 05:10:04
Passing zero arguments to unix/configure does
not create a thread-enabled build, no.

I can reproduce now.  I know I've seen this
symptom reported before, but where?
dgp Ticket [2325190fff]: 1 change [History diff]2008-11-25 05:11:01
dgpplain2008-11-25 05:25:53
can you confirm this is fixed in Tcl 8.6a3 ?
dgpplain2008-11-25 05:36:55
I know I've tracked this down before.
I see my footprints in the snow. :)
I can't find the trail.

It appears whatever I did before
fixed the problem in 8.6 but didn't
get backported to 8.5.  I'll keep looking.
sdeaseyplain2008-11-25 06:32:06
> can you confirm this is fixed in Tcl 8.6a3 ?


Hmm, probably... :-)

I updated to HEAD and my test program works.

However, there seems to be a new build oddity. Naviserver, compiled with either no flags to it's autogen.sh script, or with --enable-symbols results in the same error. Compiling with --enable-symbols=mem, the same as Tcl, now gets passed this error.

Has the Tcl build system changed such that both Tcl and the program/extension must be built the same way? I think in the passed this all used to get picked up from tclConfig.sh automatically.


Also, this is probably a different bug, but I cannot complete the naviserver tests to confirm 100% because Tcl_GetMemoryInfo aborts because it thinks the threaded allocator is not in use. But tclConfig.sh shows:

  -DTCL_THREADS=1
  -DUSE_THREAD_ALLOC=1


Do you remember if this is a genuine bug which is likely to affect a tcl compiled without mem debugging enabled, or do you think it was a bug in the debug machinery?
dgpplain2008-11-27 13:31:20
Thanks!  That was the clue I needed
to find the prior work, at least in
part:  Tcl Bug 2175442.
dgpplain2008-11-27 13:55:47
ok, so back to the reported problem.

Using Tcl 8.5.5 if you get all the
components to agree to the
--enable-symbols=mem configuration,
is the problem fixed?

If so, then this is a duplicate of
Tcl Bug 2175442.
sf-robotplain2008-12-12 09:20:07
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Log in (anonymous is fine) to add a comment.