Closed shawnlaffan closed 1 year ago
On Linux 6.5.3-1-default [openSUSE Tumbleweed 20230915]
using 5.38.0-x86_64-linux-thread-multi-quadmath
I cannot reproduce. These are the installed versions of modules used:
$ perl -d:TraceUse issue-49-ed.pl
Done stroring
Parsed storable
Done storable
Parsed sereal
Done sereal
Modules used from issue-49-ed.pl:
1. warnings 1.65, issue-49-ed.pl line 4 [main]
2. Text::CSV_XS 1.51, issue-49-ed.pl line 6 [main]
3. strict 1.12, Text/CSV_XS.pm line 18
4. XSLoader 0.32, Text/CSV_XS.pm line 22
10. IO::Handle 1.52, XSLoader.pm line 112 [Devel::TraceUse]
11. Symbol 1.09, IO/Handle.pm line 266
12. SelectSaver 1.02, IO/Handle.pm line 267
13. IO 1.52, IO/Handle.pm line 268
5. Carp 1.54, Text/CSV_XS.pm line 23
6. overloading 0.02, Carp.pm line 170
7. Exporter 5.77, Carp.pm line 224
20. Exporter::Heavy 5.77, Exporter.pm line 13
8. vars 1.05, Text/CSV_XS.pm line 25
9. warnings::register 1.05, vars.pm line 7
14. Sereal::Encoder 5.004, issue-49-ed.pl line 7 [main]
15. constant 1.33, Sereal/Encoder.pm line 74
16. Sereal::Decoder 5.004, issue-49-ed.pl line 8 [main]
17. Storable 3.32, issue-49-ed.pl line 9 [main]
18. Log::Agent, Storable.pm line 49 (FAILED)
19. Fcntl 1.15, Storable.pm line 84
21. IO::File 1.52, issue-49-ed.pl line 19 (eval 7) [main]
22. IO::Seekable 1.52, IO/File.pm line 132
I will try to reproduce on other boxes
Hah!
$ perl5.36.0 issue-49-ed.pl
Done stroring
Parsed storable
Done storable
Parsed sereal
Done sereal
$ perl5.36.0 issue-49-e.pl
Done
$ perl5.36.0 issue-49-d.pl
Segmentation fault (core dumped)
$ perl5.36.0 -d:TraceUse issue-49-ed.pl
Done stroring
Parsed storable
Done storable
Parsed sereal
Done sereal
Modules used from issue-49-ed.pl:
1. warnings 1.58, issue-49-ed.pl line 4 [main]
2. Text::CSV_XS 1.51, issue-49-ed.pl line 6 [main]
3. strict 1.12, Text/CSV_XS.pm line 18
4. XSLoader 0.31, Text/CSV_XS.pm line 22
10. IO::Handle 1.51, XSLoader.pm line 112 [Devel::TraceUse]
11. Symbol 1.09, IO/Handle.pm line 266
12. SelectSaver 1.02, IO/Handle.pm line 267
13. IO 1.51, IO/Handle.pm line 268
5. Carp 1.52, Text/CSV_XS.pm line 23
6. overloading 0.02, Carp.pm line 170
7. Exporter 5.77, Carp.pm line 224
20. Exporter::Heavy 5.77, Exporter.pm line 13
8. vars 1.05, Text/CSV_XS.pm line 25
9. warnings::register 1.04, vars.pm line 7
14. Sereal::Encoder 5.004, issue-49-ed.pl line 7 [main]
15. constant 1.33, Sereal/Encoder.pm line 74
16. Sereal::Decoder 5.004, issue-49-ed.pl line 8 [main]
17. Storable 3.26, issue-49-ed.pl line 9 [main]
18. Log::Agent, Storable.pm line 49 (FAILED)
19. Fcntl 1.15, Storable.pm line 84
21. IO::File 1.51, issue-49-ed.pl line 19 (eval 7) [main]
22. IO::Seekable 1.51, IO/File.pm line 132
Storable-3.32 is not (yet) standalone available on CPAN, but upgrading it in 5.36.0 from blead does not fix the coredump IO-File-1.52 is not (yet) standalone available on CPAN, but upgrading it in 5.36.0 from blead does not fix the coredump
/me continues digging
Thanks. Unfortunately it still segfaults on my machine when testing with perlbrew 5.36 via Ubuntu on WSL2.
The gdb backtrace is the same as reported above, although neither perl nor Text::CSV_XS have been built with debugging symbols so it won't have the full details.
Grrrr, I meanwhile can also reproduce in Windows/WSL2/openSUSE
On it, but with no high prio. Lots of other stuff on my plate too
That looks to do the trick. Works on both Strawberry Perl and WSL2/Ubuntu used for the initial report.
Thanks for the rapid responses.
Released 1.52
Serialising and deserialising objects from previous script runs leads to segmentation faults.
See attached scripts for reproduction code using Storable and Sereal formats.
Tested using Strawberry Perl 5.38.0.1 on Windows and a perlbrew 5.36.0 on Ubuntu via WSL2. Text::CSV_XS version is latest (1.51).
Encoding and decoding within the same process works.
However, encoding in one process and decoding in a later process results in a segmentation fault.
gdb backtrace:
create_and_serialise.pl.txt decode.pl.txt same_process.pl.txt