Bugs item #1679800, was opened at 2007-03-13 14:40
Message generated for change (Comment added) made by jflokstra
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1679800&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core
Group: MonetDB4 CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jan Rittinger (tsheyar)
Assigned to: Peter Boncz (boncz)
Summary: Mserver segfaults during recursive module loading

Initial Comment:
I started my Mserver with the modules pathfinder and pftijah:

Mserver --dbinit="module(pathfinder); module(pftijah); mil_start();"

and tried to pose a stupid query using the MapiClient

echo 1 | MapiClient -lx

This leads to a more or less clean segmentation fault of the Mserver. (Note 
that removing 'module(pftijah);' from the dbinit string *fixes* the problem.)

Looking at it with gdb indicates that the modules pathfinder and pftijah load 
each other recursively. I think a segfault at least isn't the expected behavior.

----------------------------------------------------------------------

>Comment By: Jan Flokstra (jflokstra)
Date: 2007-03-15 15:53

Message:
Logged In: YES 
user_id=1054297
Originator: NO

We in Twente are also suffering from this bug. I read the comments and was
a bit surprised to see a module(pftijah); in pathfinder.mx. I always
thought we build pftijah 'on' Pathfinder and there were no mutual
dependencies (yet?). Who made this change and why???
A quick fix here is to remove the .USE pathfinder line in pftijah.mx and
to load pathfinder every time pftijah. Peter already did this this week but
removed it on my request because when you loaded pftijah without loading
pathfinder first you got a very unhelpfull error message (! can't help you
here, sorry.:-)


----------------------------------------------------------------------

Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-03-15 14:19

Message:
Logged In: YES 
user_id=43607
Originator: NO

The problem lies in TBL_loadmod.
When the explicit module(pftijah) is executed, TBL_loadmod sees that the
module is already loaded (because it was loaded by pathfinder). 
TBL_loadmod then loads all modules on which pftijah depends, which includes
pathfinder because of the .USE pathfinder statement.  So pathfinder is
loaded by TBL_loadmod.  As pathfinder is also already loaded, the modules
it depends on are also loaded.  In this case, that also includes all
modules that were loaded by pathfinder through module statements in the
pathfinder code.  One of those is pftijah.  So pftijah is loaded by
TBL_loadmod.  This recurses indefinitely.

Assigning to Peter.

----------------------------------------------------------------------

Comment By: Sjoerd Mullender (sjoerd)
Date: 2007-03-15 11:32

Message:
Logged In: YES 
user_id=43607
Originator: NO

Even simpler:

11:19:34+ Mserver
# Monet Database Server V4.17.1
# Copyright (c) 1993-2007, CWI. All rights reserved.
# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs; dynamically
linked.
# Visit http://monetdb.cwi.nl/ for further information.
MonetDB>module(pathfinder);
# XRPC administrative console at http://localhost:50001/admin
MonetDB>module(pftijah);

at which point the server rapidly consumes infinite amounts of CPU and
memory.
Attaching gdb at this point shows that TBL_loadmod is called to load
pftijah, which causes a TBL_loadmod for pathfinder, which causes a
TBL_loadmod for pftijah, which causes ...


----------------------------------------------------------------------

Comment By: Jan Rittinger (tsheyar)
Date: 2007-03-15 09:12

Message:
Logged In: YES 
user_id=993208
Originator: YES

The same happens if I generate a MIL script with pathfinder (e.g. echo 1 |
pf > foo) and then pipe it to the Mserver (cat foo | Mserver).

Calling Mserver with dbinit works:
cat foo | Mserver --dbinit="module(pathfinder);"

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1679800&group_id=56967

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to