From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.0.3705) Description of problem: When working with files(opening, reading, seeking, closing) from within a Perl C extension, the program will hang during one of the file operations, usually a fseek. I haven't tested this on RedHat 8 yet, but previous versions of RedHat prior to that all work with this code on perl v5.8.0. I have condensed the C code and perl script to the bare minimum to reproduce the error. My installation of RH9 is a complete install, all available packages are already installed. Version-Release number of selected component (if applicable): 5.8.0 How reproducible: Always Steps to Reproduce: 1. After unzipping the files, compile the C code using the following command: gcc -O -c -I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE *.c The path following -I is where your perl.h,EXTERN.h,and XSUB.h files should be located by default. The CAtest_wrap.c file may give errors for crypt.h, if that happens use this instead: gcc -O -DGNU_SOURCE -c -I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE *.c 2. Link the objects into CAtest.so using the command: ld -G -o CAtest.so *.o 3. Run the perl script test_4CA.pl Actual Results: Hangs after displaying "Ok after read". Expected Results: The program should complete after the "Ok after read" message and should return control of the shell to the user. Additional info: I have noticed that running the perl script with MALLOC_CHECK set seems to alleviate the hanging, but using that isn't an option on the client end and would probably degrade performance significantly. You can test this by typing MALLOC_CHECK_=1 perl test_4CA.pl
Created attachment 92121 [details] Test code to reproduce error
I just tested the same code on a clean install of RedHat 8.0 and it runs with no problems, so this is definitely a version 9 issue.
Correction to step 1, -DGNU_SOURCE should actually be -D_GNU_SOURCE. Sorry for any confusion.
Sorry this bug seems to have been overlooked. This bug is not a problem with any current Red Hat perl releases.