[SRU] segfaults with certain trace.dat files

Bug #2042720 reported by Sudip Mukherjee
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kernelshark (Debian)
Fix Released
Unknown
kernelshark (Ubuntu)
Fix Released
Undecided
Unassigned
Lunar
Fix Released
Undecided
Unassigned
Mantic
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

KernelShark crashes when opening `trace.dat` of 'all events' and can be used by the user to analyze the particular trace file resulting in a segfault.

[ Test Plan ]

Grab the trace.dat file from https://bugzilla.kernel.org/show_bug.cgi?id=217429 and save it to $HOME.
Execute kernelshark from terminal by giving the command `kernelshark` and you can see segfault.

With the fix kernelshark will start the gui and load the trace file.

[ Where problems could occur ]

As the fix is in the error path and is only checking for seq.len which will return if its `0`. It does not change any other code and so does not change the behaviour so has little chance of regressing the user behaviour.

[ Other Info ]

 The problem exists in 2.2.0, and has been fixed by upstream on 2.2.1. It has been updated on Ubuntu Noble and Mantic. But Lunar still has the problem.
 The diff between v2.2.0..v2.2.1 are only two bugfixes. And one of them fixes the observed segmentation fault.

Changed in kernelshark (Ubuntu):
status: New → Fix Released
Changed in kernelshark (Ubuntu Mantic):
status: New → Fix Released
Robie Basak (racb)
Changed in kernelshark (Ubuntu Lunar):
status: New → Triaged
Changed in kernelshark (Debian):
status: Unknown → Fix Released
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff attached.

Dave Jones (waveform)
summary: - segfaults with certain trace.dat files
+ [SRU] segfaults with certain trace.dat files
Revision history for this message
Dave Jones (waveform) wrote :

Patch looks good. One minor nitpick was that update-maintainer needed running to correct the maintainer address in d/control, but I can trivially do that. Sponsoring for lunar.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote (last edit ): Re: [Bug 2042720] Re: [SRU] segfaults with certain trace.dat files

On Sun, 5 Nov 2023 at 12:20, Dave Jones <email address hidden> wrote:
>
> Patch looks good. One minor nitpick was that update-maintainer needed
> running to correct the maintainer address in d/control, but I can
> trivially do that. Sponsoring for lunar.

Thanks for sponsoring Dave,

But a complete newbie question as I am still learning how Ubuntu works.
Why does the "maintainer address" need updating? I am the Debian
maintainer of this package.

--
Regards
Sudip

UPDATE: Thanks Dave for explaining why the maintainer address needed updating.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Why was the Debian portion of the version bumped? it's 2.2.0-2ubuntu0.1 while it should have been -1ubuntu0.1 IMO

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Thanks for rejecting that Timo and sorry for that.

Modified debdiff attached now.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Sudip, or anyone else affected,

Accepted kernelshark into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/kernelshark/2.2.0-1ubuntu0.23.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-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. 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.

Changed in kernelshark (Ubuntu Lunar):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

well, since mantic and up already had a newer version, the lunar upload could just have used -1u0.1, but that's bikeshedding

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I can confirm that the kernelshark package in lunar-proposed has fixed the bug for me.

Test done:
1. Install kernelshark on a Lunar installation.
2. Download the trace.dat file from https://bugzilla.kernel.org/show_bug.cgi?id=217429
3. Open the trace with kernelshark and confirm that it is resulting in a segfault.
4. Add lunar-proposed to apt sources
5. Update kernelshark from lunar-proposed.
6. Open the same downloaded trace with kernelshark.

Test result: kernelshark was able to open the trace.

Package tested:
$ dpkg -l | grep kernelshark
ii kernelshark 2.9.3+really2.2.0-1ubuntu0.23.04.1 amd64 Utility for retrieving and analyzing function tracing in the kernel

Mate Kukri (mkukri)
tags: added: verification-done-lunar
removed: verification-needed-lunar
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kernelshark - 2.2.0-1ubuntu0.23.04.1

---------------
kernelshark (2.2.0-1ubuntu0.23.04.1) lunar; urgency=medium

  * Add upstream patch to fix segfault. (LP: #2042720)

 -- Sudip Mukherjee <email address hidden> Fri, 17 Nov 2023 22:34:52 +0000

Changed in kernelshark (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for kernelshark has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.