-
Notifications
You must be signed in to change notification settings - Fork 74
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
SIGSEGV with fastcgi #421
Comments
Hi! It was me. I have two such apps, but SIGSEGV only one. Opening/Closing database connection on each request not helps. |
Do you happen do have a simple way to reproduce this? |
I can reproduce problem. I don't have normal backtrace. app is launched by apache httpd mod_fastcgi. (gdb) core perl.core How to get full backtrace? :) |
gdb /usr/local/bin/perl perl.core For help, type "help". |
Probably related to this. I do get segfaults sometimes on Linux with Apache and fastcgi.
With older build and DBD::mysql 4.050 and mariadb-10.5.22 all works fine. |
I tried to reproduce this, but didn't manage to do so. Versions I used:
Script: #!/usr/local/bin/perl
use strict;
use CGI::Fast;
use DBI;
while (my $q = CGI::Fast->new) {
print "Content-Type: text/plain\n\n";
print "Perl CGI::Fast Hello World! pid=$$\n";
my $dbh = DBI->connect("dbi:mysql:host=127.0.0.1","root","Root123@");
print "mysql client version: $dbh->{mysql_clientversion}\n";
print "mysql server version: $dbh->{mysql_serverversion}\n";
my $sth = $dbh->prepare("SELECT CONNECTION_ID();");
$sth->execute || die "Execute failed: " . $sth->errstr . "\n";
while (my $ref = $sth->fetchrow_arrayref) {
print "Result: " . $$ref[0] . "\n";
}
$sth->finish;
$dbh->do('ROLLBACK RELEASE');
$dbh->ping;
my $sth = $dbh->prepare("SELECT CONNECTION_ID();");
$sth->execute || die "Execute failed: " . $sth->errstr . "\n";
while (my $ref = $sth->fetchrow_arrayref) {
print "Result: " . $$ref[0] . "\n";
}
$sth->finish;
} Output:
|
We use Apache, the workload is wwsympa from https://github.com/sympa-community/sympa 6.2.72 via spawn-fcgi |
That sounds like it would use a TCP connection for which the underlying connection was already closed by the OS. |
How can we help to find the root cause? As it works with DBD::mysql <5 , what changed there related to TCP connections? |
|
Hi! I found that problem is reproduced when script makes second connection to another database on same server with DBI->connect_cached(...) and make some prepare and execute. DBI->connect(...) works fine. FreeBSD 14.1 |
@iHeadRu could you post a script to reproduce this? |
DBD::mysql version
5.003
MySQL client version
mysql80-client-8.0.35 from pkg repository.
Server version
8.0.35?
Operating system version
FreeBSD 14.0-RELEASE-p5
What happened?
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275100#c10
I have problem with proposed patch to DBD-mysql 5.003 in fatscgi app.
First request - ok, but on second - SIGSEGV.
Cut from ktrace & kdump:
I have no problem with 4.050 from pkg repository or ports tree (even with small patch no problem).
Other information
No response
The text was updated successfully, but these errors were encountered: