Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RedHat 9 blows up at dlclose of pyexpat.so #39334

Closed
bensonbasis mannequin opened this issue Sep 29, 2003 · 9 comments
Closed

RedHat 9 blows up at dlclose of pyexpat.so #39334

bensonbasis mannequin opened this issue Sep 29, 2003 · 9 comments
Labels
extension-modules C modules in the Modules dir

Comments

@bensonbasis
Copy link
Mannequin

bensonbasis mannequin commented Sep 29, 2003

BPO 814726
Nosy @loewis, @aleaxit

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2003-11-22.06:42:38.000>
created_at = <Date 2003-09-29.20:55:10.000>
labels = ['extension-modules']
title = 'RedHat 9 blows up at dlclose of pyexpat.so'
updated_at = <Date 2003-11-22.06:42:38.000>
user = 'https://bugs.python.org/bensonbasis'

bugs.python.org fields:

activity = <Date 2003-11-22.06:42:38.000>
actor = 'anthonybaxter'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Extension Modules']
creation = <Date 2003-09-29.20:55:10.000>
creator = 'benson_basis'
dependencies = []
files = []
hgrepos = []
issue_num = 814726
keywords = []
message_count = 9.0
messages = ['18441', '18442', '18443', '18444', '18445', '18446', '18447', '18448', '18449']
nosy_count = 4.0
nosy_names = ['loewis', 'aleax', 'anthonybaxter', 'benson_basis']
pr_nums = []
priority = 'normal'
resolution = 'rejected'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue814726'
versions = ['Python 2.3']

@bensonbasis
Copy link
Mannequin Author

bensonbasis mannequin commented Sep 29, 2003

With python 2.3, built with GCC 3.2.

With RedHat 9.0 ... glibc-2.3.2-27.9

With python linked into the application as a shared
library...

a SIGSEGV at exit. Perhaps the modules should be
marked -z nodelete to duck this latest incarnation of an
old familiar glibc bug?

atexit:

(gdb) where
#0 0x42073771 in free () from /lib/tls/libc.so.6
#1 0x420ebd8e in __unregister_atfork ()
from /lib/tls/libc.so.6
#2 0x42029fb8 in __cxa_finalize ()
from /lib/tls/libc.so.6
#3 0x41fd19fc in __do_global_dtors_aux ()
from /vobs/rex/bin_g/RH72-gcc-3.2/python/pyexpat.so
#4 0x41fef3a9 in _fini () from /vobs/rex/bin_g/RH72-
gcc-3.2/python/pyexpat.so
#5 0x4000ce44 in _dl_fini () from /lib/ld-linux.so.2
#6 0x42029d40 in exit () from /lib/tls/libc.so.6
#7 0x42015708 in __libc_start_main ()
from /lib/tls/libc.so.6

@bensonbasis bensonbasis mannequin closed this as completed Sep 29, 2003
@bensonbasis bensonbasis mannequin added the extension-modules C modules in the Modules dir label Sep 29, 2003
@loewis
Copy link
Mannequin

loewis mannequin commented Oct 3, 2003

Logged In: YES
user_id=21627

This sounds like a bug in the system to me, not a bug in Python.

Maybe it can be worked-around by not building Python with g++?

Maybe it can be worked-around by not using buggy TLS
implementations?

@bensonbasis
Copy link
Mannequin Author

bensonbasis mannequin commented Oct 3, 2003

Logged In: YES
user_id=876734

If this is a system bug, it's a glibc bug, not a gcc bug. So
avoiding gcc won't help. RedHat/glibc have a very bad track
record of exploding when dlclosing C++ shared libraries.
They've had many bugs of this form. If pyexpat has to have
C++ code, it should be coded with no static constructor
usage to avoid this problem, and similiar problems that might
arise other places. TLS isn't in action.

@loewis
Copy link
Mannequin

loewis mannequin commented Oct 3, 2003

Logged In: YES
user_id=21627

I did not suggest to avoid gcc, but to avoid g++ (I'm only
guessing here, since you haven't reported the build log, ldd
output for pyexpat.so, or similar - but it might be that
pyexpat.so was linked with g++, which would explain that it
somehow calls __cxa_finalize).

pyexpat itself has no C++ in it.

@bensonbasis
Copy link
Mannequin Author

bensonbasis mannequin commented Oct 3, 2003

Logged In: YES
user_id=876734

I didn't realize that the decision to use g++ as the linker was
one that we made here locally (I didn't do the build). We'll try
avoiding it and see if things get better.

@anthonybaxter
Copy link
Mannequin

anthonybaxter mannequin commented Oct 4, 2003

Logged In: YES
user_id=29957

configure --without-cxx
is the magic you probably want.

@aleaxit
Copy link
Contributor

aleaxit commented Nov 2, 2003

Logged In: YES
user_id=60314

any news on this, i.e., does the --without-cxx solve everything? Just seeing if the bug can be marked as closed...

@bensonbasis
Copy link
Mannequin Author

bensonbasis mannequin commented Nov 21, 2003

Logged In: YES
user_id=876734

The suggested solution (--without-cxx) did the job.

@anthonybaxter
Copy link
Mannequin

anthonybaxter mannequin commented Nov 22, 2003

Logged In: YES
user_id=29957

Closing as not a bug.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension-modules C modules in the Modules dir
Projects
None yet
Development

No branches or pull requests

1 participant