[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-04-06 Thread Launchpad Bug Tracker
This bug was fixed in the package libapache2-mod-perl2 -
2.0.11-2ubuntu0.20.04.1

---
libapache2-mod-perl2 (2.0.11-2ubuntu0.20.04.1) focal; urgency=medium

  * Fix a SIGSEGV crash. (LP: #1915959)
- d/p/Fix_SIGSEGV_perl_parse.patch: Add a patch from upstream
  SVN to fix a SIGSEGV crash due to wrong use of perl_parse().
  + Thanks, Charles Pigott, for the patch.

 -- Utkarsh Gupta   Fri, 19 Mar 2021
19:00:24 +0530

** Changed in: libapache2-mod-perl2 (Ubuntu Focal)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-25 Thread Utkarsh Gupta
Awesome, thanks, Charles.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-25 Thread lordaro
Thanks very much!

2.0.11-2ubuntu0.20.04.1 fixes the bug for me.

** Tags removed: verification-needed-focal
** Tags added: verification-done-focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-24 Thread Robie Basak
Hello lordaro, or anyone else affected,

Accepted libapache2-mod-perl2 into focal-proposed. The package will
build now and be available at
https://launchpad.net/ubuntu/+source/libapache2-mod-
perl2/2.0.11-2ubuntu0.20.04.1 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
focal to verification-done-focal. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-focal. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Tags added: verification-needed verification-needed-focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-22 Thread Utkarsh Gupta
** Changed in: libapache2-mod-perl2 (Ubuntu Focal)
   Status: Triaged => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-19 Thread Utkarsh Gupta
** Description changed:

  [Impact]
  
  
  While setting up a perl web application with mod_perl & apache, apache
  keeps segfaulting.
  
  Broke out gdb, and found that it was segfaulting within perl itself
  
  Program received signal SIGSEGV, Segmentation fault.
  0x77358ff5 in perl_parse () from /lib/x86_64-linux-gnu/libperl.so.5.30
  (gdb) bt
  #0  0x77358ff5 in perl_parse () from 
/lib/x86_64-linux-gnu/libperl.so.5.30
  #1  0x7764cd0c in modperl_startup () from 
/usr/lib/apache2/modules/mod_perl.so
  #2  0x7764cc97 in modperl_startup () from 
/usr/lib/apache2/modules/mod_perl.so
  #3  0x7764d0fa in modperl_init () from 
/usr/lib/apache2/modules/mod_perl.so
  #4  0x7764d27b in modperl_hook_init () from 
/usr/lib/apache2/modules/mod_perl.so
  #5  0x555b23d4 in ap_run_open_logs ()
  #6  0x5558c440 in main ()
  
   # valgrind apache2 -k start -X
  ==22529== Memcheck, a memory error detector
  ==22529== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
  ==22529== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
  ==22529== Command: apache2 -k start -X
  ==22529==
  ==22529== Invalid read of size 8
  ==22529==at 0x564AFF5: perl_parse (in 
/usr/lib/x86_64-linux-gnu/libperl.so.5.30.0)
  ==22529==by 0x55A8D0B: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A8C96: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A90F9: modperl_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A927A: modperl_hook_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x1663D3: ap_run_open_logs (in /usr/sbin/apache2)
  ==22529==by 0x14043F: main (in /usr/sbin/apache2)
  ==22529==  Address 0x5a44000 is not stack'd, malloc'd or (recently) free'd
  ==22529==
  ==22529==
  ==22529== Process terminating with default action of signal 11 (SIGSEGV)
  ==22529==  Access not within mapped region at address 0x5A44000
  ==22529==at 0x564AFF5: perl_parse (in 
/usr/lib/x86_64-linux-gnu/libperl.so.5.30.0)
  ==22529==by 0x55A8D0B: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A8C96: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A90F9: modperl_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A927A: modperl_hook_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x1663D3: ap_run_open_logs (in /usr/sbin/apache2)
  ==22529==by 0x14043F: main (in /usr/sbin/apache2)
  
  gdb indicated that it was erroring in very early in perl's runtime,
  before it had got to any perl code. When using debug symbols, the exact
  line it was failing on was `scriptname = argv[0];` (perl.c:2365) It
  wasn't possible to reason beyond that as stepping through optimised code
  even with debug symbols is next to impossible to make any sense of.
  
  I did find that building an unoptimised perl made the error go away.
  
  I found the following closed issue:
  https://github.com/Perl/perl5/issues/15806 which describes the same
  issue I was having.
  
  Looking at the source for mod_perl, I found that the argv array passed
  to perl_parse() is not NULL terminated as is required by perl - (
  documentation: https://perldoc.perl.org/perlembed#Adding-a-Perl-
  interpreter-to-your-C-program )
  
  After patching this, the problem went away and didn't come back. Patch
  is attached.
  
- 
  [Test Plan]
  ===
  
   # ls
  libapache2-mod-perl2_2.0.11-2_amd64.clean.deb  
libapache2-mod-perl2_2.0.11-2_amd64.patched.deb
  
   # dpkg -i libapache2-mod-perl2_2.0.11-2_amd64.clean.deb
  (Reading database ... 33224 files and directories currently installed.)
  Preparing to unpack libapache2-mod-perl2_2.0.11-2_amd64.clean.deb ...
  Unpacking libapache2-mod-perl2 (2.0.11-2) over (2.0.11-2) ...
  Setting up libapache2-mod-perl2 (2.0.11-2) ...
  apache2_invoke perl: already enabled
  
   # source /etc/apache2/envvars
  
   # apache2 -k start -X
  Segmentation fault (core dumped)
  
   # dpkg -i libapache2-mod-perl2_2.0.11-2_amd64.patched.deb
  (Reading database ... 33224 files and directories currently installed.)
  Preparing to unpack libapache2-mod-perl2_2.0.11-2_amd64.patched.deb ...
  Unpacking libapache2-mod-perl2 (2.0.11-2) over (2.0.11-2) ...
  Setting up libapache2-mod-perl2 (2.0.11-2) ...
  apache2_invoke perl: already enabled
  
   # apache2 -k start -X
  ^C
  
   # dpkg -i libapache2-mod-perl2_2.0.11-2_amd64.clean.deb
  (Reading database ... 33224 files and directories currently installed.)
  Preparing to unpack libapache2-mod-perl2_2.0.11-2_amd64.clean.deb ...
  Unpacking libapache2-mod-perl2 (2.0.11-2) over (2.0.11-2) ...
  Setting up libapache2-mod-perl2 (2.0.11-2) ...
  apache2_invoke perl: already enabled
  
   # apache2 -k start -X
  Segmentation fault (core dumped)
  
  So after the SRU is performed, apache should no longer segfault.
  
- 
  

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-19 Thread Utkarsh Gupta
** Description changed:

+ [Impact]
+ 
+ 
  While setting up a perl web application with mod_perl & apache, apache
- kept segfaulting.
+ keeps segfaulting.
  
  Broke out gdb, and found that it was segfaulting within perl itself
  
  Program received signal SIGSEGV, Segmentation fault.
  0x77358ff5 in perl_parse () from /lib/x86_64-linux-gnu/libperl.so.5.30
  (gdb) bt
  #0  0x77358ff5 in perl_parse () from 
/lib/x86_64-linux-gnu/libperl.so.5.30
  #1  0x7764cd0c in modperl_startup () from 
/usr/lib/apache2/modules/mod_perl.so
  #2  0x7764cc97 in modperl_startup () from 
/usr/lib/apache2/modules/mod_perl.so
  #3  0x7764d0fa in modperl_init () from 
/usr/lib/apache2/modules/mod_perl.so
  #4  0x7764d27b in modperl_hook_init () from 
/usr/lib/apache2/modules/mod_perl.so
  #5  0x555b23d4 in ap_run_open_logs ()
  #6  0x5558c440 in main ()
  
   # valgrind apache2 -k start -X
  ==22529== Memcheck, a memory error detector
  ==22529== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
  ==22529== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
  ==22529== Command: apache2 -k start -X
  ==22529==
  ==22529== Invalid read of size 8
  ==22529==at 0x564AFF5: perl_parse (in 
/usr/lib/x86_64-linux-gnu/libperl.so.5.30.0)
  ==22529==by 0x55A8D0B: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A8C96: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A90F9: modperl_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A927A: modperl_hook_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x1663D3: ap_run_open_logs (in /usr/sbin/apache2)
  ==22529==by 0x14043F: main (in /usr/sbin/apache2)
  ==22529==  Address 0x5a44000 is not stack'd, malloc'd or (recently) free'd
  ==22529==
  ==22529==
  ==22529== Process terminating with default action of signal 11 (SIGSEGV)
  ==22529==  Access not within mapped region at address 0x5A44000
  ==22529==at 0x564AFF5: perl_parse (in 
/usr/lib/x86_64-linux-gnu/libperl.so.5.30.0)
  ==22529==by 0x55A8D0B: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A8C96: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A90F9: modperl_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x55A927A: modperl_hook_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x1663D3: ap_run_open_logs (in /usr/sbin/apache2)
  ==22529==by 0x14043F: main (in /usr/sbin/apache2)
  
  gdb indicated that it was erroring in very early in perl's runtime,
  before it had got to any perl code. When using debug symbols, the exact
  line it was failing on was `scriptname = argv[0];` (perl.c:2365) It
  wasn't possible to reason beyond that as stepping through optimised code
  even with debug symbols is next to impossible to make any sense of.
  
  I did find that building an unoptimised perl made the error go away.
  
  I found the following closed issue:
  https://github.com/Perl/perl5/issues/15806 which describes the same
  issue I was having.
  
  Looking at the source for mod_perl, I found that the argv array passed
  to perl_parse() is not NULL terminated as is required by perl - (
  documentation: https://perldoc.perl.org/perlembed#Adding-a-Perl-
  interpreter-to-your-C-program )
  
  After patching this, the problem went away and didn't come back. Patch
  is attached.
  
- However, for some reason or another, the problem is very inconsistent.
- Sometimes it will work fine, other times it will fail repeatedly. I
- suspect it has something to do with my environment (ubuntu-minimal:focal
- LXD container). It almost feels like the act of installing all the build
- dependencies for mod_perl made the crash disappear. However, with a
- clean container and copying the patched deb across, it does appear to be
- repeatable:
+ 
+ [Test Plan]
+ ===
  
   # ls
  libapache2-mod-perl2_2.0.11-2_amd64.clean.deb  
libapache2-mod-perl2_2.0.11-2_amd64.patched.deb
+ 
   # dpkg -i libapache2-mod-perl2_2.0.11-2_amd64.clean.deb
  (Reading database ... 33224 files and directories currently installed.)
  Preparing to unpack libapache2-mod-perl2_2.0.11-2_amd64.clean.deb ...
  Unpacking libapache2-mod-perl2 (2.0.11-2) over (2.0.11-2) ...
  Setting up libapache2-mod-perl2 (2.0.11-2) ...
  apache2_invoke perl: already enabled
+ 
   # source /etc/apache2/envvars
+ 
   # apache2 -k start -X
  Segmentation fault (core dumped)
+ 
   # dpkg -i libapache2-mod-perl2_2.0.11-2_amd64.patched.deb
  (Reading database ... 33224 files and directories currently installed.)
  Preparing to unpack libapache2-mod-perl2_2.0.11-2_amd64.patched.deb ...
  Unpacking libapache2-mod-perl2 (2.0.11-2) over (2.0.11-2) ...
  Setting up libapache2-mod-perl2 (2.0.11-2) ...
  apache2_invoke perl: already enabled
+ 
   # apache2 -k start -X
  ^C
+ 
   # dpkg -i libapache2-mo

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-19 Thread Launchpad Bug Tracker
** Merge proposal linked:
   
https://code.launchpad.net/~utkarsh/ubuntu/+source/libapache2-mod-perl2/+git/libapache2-mod-perl2/+merge/399921

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-19 Thread Utkarsh Gupta
Hi Charles,

I am almost done preparing an update. This should land very soon! I'll
keep you updated here.

** Changed in: libapache2-mod-perl2 (Ubuntu Focal)
 Assignee: (unassigned) => Utkarsh Gupta (utkarsh)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-17 Thread lordaro
Not to nag or anything, but any sort of timescale on this? I'd happily
help out, but having read through the process I'm not actually sure what
needs doing...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-08 Thread lordaro
** Description changed:

  While setting up a perl web application with mod_perl & apache, apache
  kept segfaulting.
  
  Broke out gdb, and found that it was segfaulting within perl itself
  
  Program received signal SIGSEGV, Segmentation fault.
- 0x77358ff5 in perl_parse () from /lib/x86_64-linux-
- gnu/libperl.so.5.30
+ 0x77358ff5 in perl_parse () from /lib/x86_64-linux-gnu/libperl.so.5.30
  (gdb) bt
- #0  0x77358ff5 in perl_parse () from /lib/x86_64-linux-
- gnu/libperl.so.5.30
- #1  0x7764cd0c in modperl_startup () from
- /usr/lib/apache2/modules/mod_perl.so
- #2  0x7764cc97 in modperl_startup () from
- /usr/lib/apache2/modules/mod_perl.so
- #3  0x7764d0fa in modperl_init () from
- /usr/lib/apache2/modules/mod_perl.so
- #4  0x7764d27b in modperl_hook_init () from
- /usr/lib/apache2/modules/mod_perl.so
+ #0  0x77358ff5 in perl_parse () from 
/lib/x86_64-linux-gnu/libperl.so.5.30
+ #1  0x7764cd0c in modperl_startup () from 
/usr/lib/apache2/modules/mod_perl.so
+ #2  0x7764cc97 in modperl_startup () from 
/usr/lib/apache2/modules/mod_perl.so
+ #3  0x7764d0fa in modperl_init () from 
/usr/lib/apache2/modules/mod_perl.so
+ #4  0x7764d27b in modperl_hook_init () from 
/usr/lib/apache2/modules/mod_perl.so
  #5  0x555b23d4 in ap_run_open_logs ()
  #6  0x5558c440 in main ()
  
-  # valgrind apache2 -k start -X
+  # valgrind apache2 -k start -X
  ==22529== Memcheck, a memory error detector
- ==22529== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et
- al.
- ==22529== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright
- info
+ ==22529== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+ ==22529== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
  ==22529== Command: apache2 -k start -X
  ==22529==
  ==22529== Invalid read of size 8
- ==22529==at 0x564AFF5: perl_parse (in /usr/lib/x86_64-linux-
- gnu/libperl.so.5.30.0)
- ==22529==by 0x55A8D0B: modperl_startup (in
- /usr/lib/apache2/modules/mod_perl.so)
- ==22529==by 0x55A8C96: modperl_startup (in
- /usr/lib/apache2/modules/mod_perl.so)
- ==22529==by 0x55A90F9: modperl_init (in
- /usr/lib/apache2/modules/mod_perl.so)
- ==22529==by 0x55A927A: modperl_hook_init (in
- /usr/lib/apache2/modules/mod_perl.so)
+ ==22529==at 0x564AFF5: perl_parse (in 
/usr/lib/x86_64-linux-gnu/libperl.so.5.30.0)
+ ==22529==by 0x55A8D0B: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
+ ==22529==by 0x55A8C96: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
+ ==22529==by 0x55A90F9: modperl_init (in 
/usr/lib/apache2/modules/mod_perl.so)
+ ==22529==by 0x55A927A: modperl_hook_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x1663D3: ap_run_open_logs (in /usr/sbin/apache2)
  ==22529==by 0x14043F: main (in /usr/sbin/apache2)
- ==22529==  Address 0x5a44000 is not stack'd, malloc'd or (recently)
- free'd
+ ==22529==  Address 0x5a44000 is not stack'd, malloc'd or (recently) free'd
  ==22529==
  ==22529==
  ==22529== Process terminating with default action of signal 11 (SIGSEGV)
  ==22529==  Access not within mapped region at address 0x5A44000
- ==22529==at 0x564AFF5: perl_parse (in /usr/lib/x86_64-linux-
- gnu/libperl.so.5.30.0)
- ==22529==by 0x55A8D0B: modperl_startup (in
- /usr/lib/apache2/modules/mod_perl.so)
- ==22529==by 0x55A8C96: modperl_startup (in
- /usr/lib/apache2/modules/mod_perl.so)
- ==22529==by 0x55A90F9: modperl_init (in
- /usr/lib/apache2/modules/mod_perl.so)
- ==22529==by 0x55A927A: modperl_hook_init (in
- /usr/lib/apache2/modules/mod_perl.so)
+ ==22529==at 0x564AFF5: perl_parse (in 
/usr/lib/x86_64-linux-gnu/libperl.so.5.30.0)
+ ==22529==by 0x55A8D0B: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
+ ==22529==by 0x55A8C96: modperl_startup (in 
/usr/lib/apache2/modules/mod_perl.so)
+ ==22529==by 0x55A90F9: modperl_init (in 
/usr/lib/apache2/modules/mod_perl.so)
+ ==22529==by 0x55A927A: modperl_hook_init (in 
/usr/lib/apache2/modules/mod_perl.so)
  ==22529==by 0x1663D3: ap_run_open_logs (in /usr/sbin/apache2)
  ==22529==by 0x14043F: main (in /usr/sbin/apache2)
  
  gdb indicated that it was erroring in very early in perl's runtime,
  before it had got to any perl code. When using debug symbols, the exact
  line it was failing on was `scriptname = argv[0];` (perl.c:2365) It
  wasn't possible to reason beyond that as stepping through optimised code
  even with debug symbols is next to impossible to make any sense of.
  
  I did find that building an unoptimised perl made the error go away.
  
  I found the following closed issue:
  https://github.com/Perl/perl5/issues/15806 which describes the same
  issue I was having.
  
  Looking at the source for mod_perl, I found that the argv array passed
  to perl_parse() is not NULL terminated as is required by perl - (
  documentation: 

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-03-01 Thread Robie Basak
Yes, this can be backported to Focal. It will need somebody affected to
commit to doing the necessary QA after the update is prepared (without
that QA, we won't be able to land the update).

The process is documented at
https://wiki.ubuntu.com/StableReleaseUpdates#Procedure as gregor
correctly pointed out. I'll add this task to the server team's backlog.
If you'd like to do it sooner, you are welcome to prepare the update
yourself following the documented process.

The commit that needs to be cherry-picked is here:
https://salsa.debian.org/perl-team/modules/packages/libapache2-mod-
perl2/-/commit/ad28961ec0e3ac3e450eb47c53c6d8cc114fb17d

** Also affects: libapache2-mod-perl2 (Ubuntu Focal)
   Importance: Undecided
   Status: New

** Changed in: libapache2-mod-perl2 (Ubuntu Focal)
   Status: New => Triaged

** Changed in: libapache2-mod-perl2 (Ubuntu Focal)
   Importance: Undecided => Medium

** Tags added: bitesize server-next

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Re: [Pkg-perl-maintainers] [Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-02-26 Thread gregor herrmann
On Fri, 26 Feb 2021 10:00:44 -, lordaro wrote:

> Thank you. Is there anything that needs to be done/can be done to get
> this backported to focal?

Probably, but I'm not familiar with Ubuntu processes (I uploaded the
fix to Debian/unstable from where it migrated to Ubuntu/hirsute).

Maybe https://wiki.ubuntu.com/StableReleaseUpdates has the answer, or
someone else will chime in here.


Cheers,
gregor, Debian Perl Group

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: Mark Knopfler: Wanderlust

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-02-26 Thread lordaro
Thank you. Is there anything that needs to be done/can be done to get
this backported to focal?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-02-24 Thread Launchpad Bug Tracker
This bug was fixed in the package libapache2-mod-perl2 - 2.0.11-4

---
libapache2-mod-perl2 (2.0.11-4) unstable; urgency=medium

  * Add a patch from upstream SVN to fix a SIGSEGV crash due to wrong use
of perl_parse(). (LP: #1915959)
  * Update years of packaging copyright.

 -- gregor herrmann   Mon, 22 Feb 2021 19:00:30 +0100

** Changed in: libapache2-mod-perl2 (Ubuntu)
   Status: Incomplete => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-02-22 Thread lordaro
Success!

https://svn.apache.org/viewvc?view=revision&revision=1886793

Consider this a backport request :)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-02-18 Thread lordaro
The crash is bizarre. I have plenty of other hosts that are making use
of mod_perl with no issues at all. It can't be (directly) application
specific, as it's crashing before it even gets to running any of the
perl. If I uninstall mariadb (required for this application), it starts
working again. If I reinstall mariadb, it keeps on working. If I
recreate the container from scratch, it reliably starts segfaulting.
When I fiddle with it some amount with debug packages and so on, it
starts working again and I can't make it break again.

Such is undefined behaviour and invalid memory accesses, I suppose.

You might be able to try debug mod_perl + debug perl - perhaps that will
reliably show up the invalid read error in valgrind?

And yes, I did look into submitting the patch upstream but frankly the
email system and everything else scared me off. The project doesn't look
particularly active either. However, I'll look a bit deeper to see what
I can I can do.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-02-18 Thread Paride Legovini
Hello and thanks for all the debugging work here. I agree with your
analysis, I think that we have a bug here and the fix you proposed LGTM.
However despite my efforts I couldn't reproduce the segfault. I
specifically tried with ubuntu-minimal:focal containers with just
apache2 and libapache2-mod-perl2 installed, enabled the perl module,
stopped apache2 and re-started it manually like you did but to no avail,
even after trying several times in different containers or environments.

I understand the very nature of the bug may make it difficult to
reproduce, but a reproducer will make the whole process of including the
fix and shipping it in existing Ubuntu stable releases both easier and
more solid. Even "obvious fixes" carry a regression potential, which has
to be weighted against the benefits of shipping the fix, and for some
reason users hit the issue you described quite rarely. Can you think of
a way to force the crash to happen, or at least make it much more
probable?

Also it may be worth submitting your patch upstream. Upstreamed patches
are always a win-win: it's easier for downstream distributions to
cherry-pick and later drop patches included upstream, package
maintenance is easier, the patch gets broader testing and the wider
ecosystems benefits from it. Would you consider submitting your patch to
the Apache mod_perl project [1]?

I'm marking this bug report as Incomplete for the moment, which simply
means that we're waiting for further comments/information.

[1] https://perl.apache.org/contribute/index.html

** Changed in: libapache2-mod-perl2 (Ubuntu)
   Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-02-17 Thread Ubuntu Foundations Team Bug Bot
The attachment "Proposed patch fixing the issue" seems to be a patch.
If it isn't, please remove the "patch" flag from the attachment, remove
the "patch" tag, and if you are a member of the ~ubuntu-reviewers,
unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1915959] Re: Crashes with SIGSEGV due to undefined behaviour when calling perl_parse

2021-02-17 Thread lordaro
Oops, looks like my gdb/valgrind output formatting got messed up. Should
still be broadly readable

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915959

Title:
  Crashes with SIGSEGV due to undefined behaviour when calling
  perl_parse

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/1915959/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs