Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-03-2003
iostream iostream is offline
Registered User
 
 
Join Date: Jun 2003
Location: Reston, VA
Posts: 13
inheritence test hangs

Hi all,

As a (perhaps-soon-to-be-ex) CORBA/C++ guy, I've been interested in trying out ICE, and it looks pretty cool from the docs. I'm trying to get 1.0.1 running on a RedHat 9 box. I got past the compile errors thanks to some posts in this forum. Running the tests, I get to:

*** running tests in ./test/Ice/inheritance:

starting server... ok
starting client... ok

Wherupon it just hangs forever. Well, OK, not forever, but for longer than I want to wait around for a test to complete. ;-)

Any ideas?

Stephen
Reply With Quote
  #2 (permalink)  
Old 06-03-2003
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Hi,

RH9 uses a new threading model by default which causes this hang. Until this issue is resolved, the solution is to set the following environment variable:

export LD_ASSUME_KERNEL=2.4.1

Take care,
- Mark
Reply With Quote
  #3 (permalink)  
Old 06-03-2003
iostream iostream is offline
Registered User
 
 
Join Date: Jun 2003
Location: Reston, VA
Posts: 13
Question that's the ticket -- new problem: DB_ENV->open: Function not implemented

Thanks, that seems to do the trick.

I noticed that 1.1.0 was available, so I dowloaded it and tried it. (Used the same LD_ASSUME_KERNEL=2.4.1). Now I get the following:

*** running tests in ./test/Freeze/cursor:

starting client... ok
DBI.cpp:141: Freeze:BException:
Freeze:BEnvironment("./test/Freeze/cursor/db"): DB_ENV->open: Function not implemented
test failed with exit status 1

This seems like a Berkeley DB error. I have version 4.1.1. Any ideas on this one?

Thanks,

Stephen
Reply With Quote
  #4 (permalink)  
Old 06-03-2003
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Yes, I've seen that error as well when I tried building Ice against the native BerkeleyDB installed by default on RH9. I'm assuming that RedHat is installing a minimal version of BerkeleyDB, so I'm afraid you'll need to build it yourself.

If you're planning to use Ice for Java, don't forget to use the --enable-java option when configuring BerkeleyDB.

- Mark
Reply With Quote
  #5 (permalink)  
Old 06-03-2003
iostream iostream is offline
Registered User
 
 
Join Date: Jun 2003
Location: Reston, VA
Posts: 13
Hmm, I did build Berkeley DB on this box for another project I'm working on. Actually, I thought that may be the reason that it was failing, because I still have the Berkeley packages that came with RedHat (4.0.x) running side by side with the version I built myself (4.1.x). This has never created problems before in my other project that makes use of Berkeley. I thought about just doing an rpm --erase db4 db4-devel, but too much stuff depends on db4, and the API changed between 4.0 and 4.1.

Any other ideas, or is there anything I can do to get more information that might help?

Thanks for your help,

Stephen
Reply With Quote
  #6 (permalink)  
Old 06-03-2003
iostream iostream is offline
Registered User
 
 
Join Date: Jun 2003
Location: Reston, VA
Posts: 13
By the way, one of the big things that changed between Berkeley DB 4.0 and 4.1 was the open() call, which is what lead me to suspect a version mismatch.

Stephen
Reply With Quote
  #7 (permalink)  
Old 06-03-2003
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Hi,

If you unset the LD_ASSUME_KERNEL environment variable, I'll bet that test will work fine. Of course, other Ice tests won't.

After looking into this issue, I discovered that BerkeleyDB (whichever version you use) must be configured on RH9 with the LD_ASSUME_KERNEL environment variable already set.

I just built BerkeleyDB 4.1.25 on my RH9 box, but had forgotten to set the environment variable until after I had built and installed BerkeleyDB, and I encountered the same error message.

This essentially rules out the use of the native BerkeleyDB that is included with RH9. The good news is that, after building BerkeleyDB with LD_ASSUME_KERNEL set to 2.4.1, the library seems to work fine with or without LD_ASSUME_KERNEL set for applications.

We'll add a note about this issue to the INSTALL.LINUX file for the next release. Thanks for bringing this to our attention.

- Mark
Reply With Quote
  #8 (permalink)  
Old 06-03-2003
iostream iostream is offline
Registered User
 
 
Join Date: Jun 2003
Location: Reston, VA
Posts: 13
Ah, I see. Thanks for the info, I'll build a separate copy with that flag and stick it in /opt/db4_special, or something like that and let you know if I can get it to peacefully coexist.

Stephen
Reply With Quote
  #9 (permalink)  
Old 06-03-2003
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 813
I looked into this issue a little bit further: there is just one difference when you configure Berkeley DB with or without LD_ASSUME_KERNEL=2.4.1.

With LD_ASSUME_KERNEL=2.4.1, configure outputs:
> checking for mutexes ... x86/gcc-assembly

Without (the default), configure outputs:
> checking for mutexes ... POSIX/pthreads/library

So the Berkeley DB that comes with RH9 (or that you build from scratch without worrying about LD_ASSUME_KERNEL) uses the POSIX library. Unfortunately Berkeley DB by default creates process-shared mutex and LinuxThreads does not implement pthread_mutexattr_setpshared( PTHREAD_PROCESS_SHARED ), which explains the failure. I verified all this with a debug Berkeley DB build.

Fortunately there is a simple work-around: in Freeze, add DB_PRIVATE to the flags used to initialize the DB environment (see line 170 of src/Freeze/DBI.cpp). Then you can use a Berkeley DB built with POSIX mutexes.

Cheers,
Bernard
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
python: shutdown of communicator hangs hiasl Help Center 6 02-05-2007 02:50 PM
IceStorm hangs T. Barry Help Center 1 03-02-2006 04:49 AM
IcePy 2.0.0 fails, hangs on Mac OS X 10.3 Michael Halle Bug Reports 1 11-30-2004 11:07 AM
Ice::initialize hangs on Panther taweili Help Center 0 11-02-2003 07:28 AM
Test fail Diego Giraldez Help Center 6 05-09-2003 02:16 PM


All times are GMT -4. The time now is 10:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.