Skip Menu |

This queue is for tickets about the Tcl CPAN distribution.

Report information
The Basics
Id: 132278
Status: open
Priority: 0/
Queue: Tcl

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc: CAC [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Test failures on Debian 10, perl 5.30.0
Hi! Testing 1.07 on Debian 10, perl 5.30.0 results in a failed test and a number of tests which output a "munmap_chunk(): invalid pointer" message and which seem to pass, but still result in a failure (the test summary says "Non-zero wait status: 6"). I've attached a log of the failing tests. Diab
Subject: log
Download log
application/octet-stream 40k

Message body not shown because it is not plain text.

I recently posted to the tcltk@perl.org mailing list about this exact issue:

https://www.mail-archive.com/tcltk@perl.org/msg00817.html

The error occurs for Tcl::pTk programs which make use of the Tcl/Tk Tktable extension, as the failed tests do. The crash only occurs when exiting; the programs and Tktable otherwise appear to work normally. I noticed this affects recent versions of Debian and Ubuntu; it has been replicated on CentOS 7 as well (if I understand correctly, glibc is the common factor).

Some progress has been made toward understanding the issue, which more broadly affects any usage of the Tcl.pm wrapper: if environment variables are set from Tcl (which is what Tktable does), then when Tcl and Perl clean up on exit, the memory used for those variables is first freed by Tcl, but then freed again by Perl.

It's not known whether a possible solution or workaround exists. The problem is not specifically in Tcl::pTk nor Tktable, and maybe not in Tcl.pm. But if it is an issue in Tcl or Perl themselves, it's unclear to me whether this is issue is something they would be willing to address or if it could instead be something they already consider expected behavior.


On Wed Apr 01 04:36:32 2020, CAC wrote: Show quoted text
> I recently posted to the tcltk@perl.org mailing list about this exact > issue: > > https://www.mail-archive.com/tcltk@perl.org/msg00817.html > > The error occurs for Tcl::pTk programs which make use of the Tcl/Tk > Tktable > extension, as the failed tests do. The crash only occurs when exiting; > the > programs and Tktable otherwise appear to work normally. I noticed this > affects > recent versions of Debian and Ubuntu; it has been replicated on CentOS > 7 as > well (if I understand correctly, glibc is the common factor). > > Some progress has been made toward understanding the issue, which more > broadly > affects any usage of the Tcl.pm wrapper: if environment variables are > set from > Tcl (which is what Tktable does), then when Tcl and Perl clean up on > exit, the > memory used for those variables is first freed by Tcl, but then freed > again by > Perl. > > It's not known whether a possible solution or workaround exists. The > problem is > not specifically in Tcl::pTk nor Tktable, and maybe not in Tcl.pm. But > if it is > an issue in Tcl or Perl themselves, it's unclear to me whether this is > issue is > something they would be willing to address or if it could instead be > something > they already consider expected behavior.
Thanks for your work and the link. Great job debugging this!
Vadim suggested I open a ticket for the issue under Tcl.pm; I have instead moved the existing ticket. I meant to adjust the title as well to something like "double free on exit if environment variables set from Tcl", but once I moved this ticket away from Tcl::pTk I lost the right to do so—oops.