perl dumps core in DBI->data_sources('mysql', { host => 'unresolvable' })

Bug #1309896 reported by Lasse Makholm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libdbd-mysql-perl (Ubuntu)
New
Undecided
Unassigned

Bug Description

Perl seems to trip up on a bad munmap() when attempting to connect to an unresoavlable host:

lasse@depravity:~$ perl -MDBI -e 'DBI->data_sources("mysql", { host => "unresolvable" })'
*** Error in `perl': munmap_chunk(): invalid pointer: 0x00007fffd31bb950 ***
Aborted (core dumped)
lasse@depravity:~$

A plain connect works:

lasse@depravity:~$ perl -MDBI -e 'DBI->connect("dbi:mysql:host=unresolvable")'
DBI connect('host=unresolvable','',...) failed: Unknown MySQL server host 'unresolvable' (0) at -e line 1.
lasse@depravity:~$

Stacktrace:

#0 0x00007fc315670f79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007fc315674388 in __GI_abort () at abort.c:89
#2 0x00007fc3156ae1d4 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7fc3157bca10 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007fc3156b8f37 in malloc_printerr (action=<optimized out>, str=0x7fc3157bcd90 "munmap_chunk(): invalid pointer", ptr=<optimized out>) at malloc.c:4996
#4 0x00007fc313fba9a0 in mysql_dr_connect () from /usr/lib/perl5/auto/DBD/mysql/mysql.so
#5 0x00007fc313fc2da3 in ?? () from /usr/lib/perl5/auto/DBD/mysql/mysql.so
#6 0x00007fc3143eb09f in XS_DBI_dispatch () from /usr/lib/perl5/auto/DBI/DBI.so
#7 0x00007fc315ab9866 in Perl_pp_entersub () from /usr/lib/libperl.so.5.18
#8 0x00007fc315ab1e86 in Perl_runops_standard () from /usr/lib/libperl.so.5.18
#9 0x00007fc315a4321c in Perl_call_sv () from /usr/lib/libperl.so.5.18
#10 0x00007fc3143eba09 in XS_DBI_dispatch () from /usr/lib/perl5/auto/DBI/DBI.so
#11 0x00007fc315ab9866 in Perl_pp_entersub () from /usr/lib/libperl.so.5.18
#12 0x00007fc315ab1e86 in Perl_runops_standard () from /usr/lib/libperl.so.5.18
#13 0x00007fc315a4a844 in perl_run () from /usr/lib/libperl.so.5.18
#14 0x0000000000400dd9 in main ()

The stacktrace seems to point to libdbd-mysql-perl as the culprit but I guess it might as well be perl, libdbi-perl or libmysqlclient18...

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: perl 5.18.2-2ubuntu1 [modified: usr/bin/perldoc]
Uname: Linux 3.14.0-custom x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Apr 19 11:14:26 2014
InstallationDate: Installed on 2014-04-04 (14 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Daily amd64 (20140404)
SourcePackage: perl
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lasse Makholm (lasse-makholm) wrote :
Revision history for this message
Lasse Makholm (lasse-makholm) wrote :

Attached core file.

affects: perl (Ubuntu) → libdbd-mysql-perl (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.