logo       

Re: Linux deconstruction order problem: msg#00025

Subject: Re: Linux deconstruction order problem

On Dec 12, 2006, at 5:22 PM, Stephen Bartnikowski wrote:

Hi,

I'm having a problem on shutdown of my application, but only on Linux. I've attached the stack trace of the last thread at the bottom of this message.

From what I can tell, in frame 3, apr_atomic_casptr is attempting to lock a mutex, but the mutex has already been destroyed. This consistently causes my
application to abort.  The mutex is initialized the first time
APRInitializer::getInstance is called.

I'm wondering if the call order could be changed somehow on destruction.
However, frame 6 of my core dump is showing me that the object being
destroyed is a static class member variable, and I don't have any control
over when those are initialized or destroyed.

I think it may be related to bug 159, but that bug is reporting a seg fault, so I'm not sure if this is related. Does any one have any suggestions for
working around this?

Thanks,
Steve


There are two scenarios where I have seen this type of problem (three if you include deviations from spec in earlier gcc's): destruction of the Level constants (Level::OFF etc) that appear at the end of src/ level.cpp and logging taking place during the destruction of static objects.

You might try commenting out Level::OFF et al from include/log4cxx/ level.h and the constructors at the bottom of src/level.cpp. log4cxx shouldn't need them since it uses the equivalent Level::getOff() et al methods. They have been kept for compatibility with earlier versions of log4cxx but been problematic and should likely be removed. I can't tell from the stack trace if you are running into this problem or something else.





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe