Bug 32859

Summary: k3b segfaults when a CD/DVD is [inserted] in the drive
Product: Mageia Reporter: Frank Griffin <ftg>
Component: RPM PackagesAssignee: Nicolas Lécureuil <mageia>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: k3b-23.04.1-1.mga9.src.rpm CVE:
Status comment:

Description Frank Griffin 2024-02-17 01:44:18 CET
This started happening with Plasma 6.1, then corrected itself, and now it's happening again with 6.2.  Here's the backtrace, for what it's worth:

(gdb) bt
#0  0x00007ffff7a789f3 in K3b::Device::debugBitfield(unsigned char*, long) ()
    at /lib64/libk3bdevice.so.8
#1  0x00007ffff7a6521f in K3b::Device::Device::diskInfo() const ()
    at /lib64/libk3bdevice.so.8
#2  0x00007ffff7cbfd4e in K3b::Medium::update() () at /lib64/libk3blib.so.8
#3  0x00007ffff7cc0acb in K3b::MediaCache::PollThread::run() ()
    at /lib64/libk3blib.so.8
#4  0x00007ffff56da337 in QThreadPrivate::start(void*) ()
    at /lib64/libQt6Core.so.6
#5  0x00007ffff5ab19ca in start_thread () at /lib64/libc.so.6
#6  0x00007ffff5b2d61c in clone3 () at /lib64/libc.so.6
(gdb)
Comment 1 Lewis Smith 2024-02-20 20:47:02 CET
Frank, please can you explain more. At what point did K3b crash - on starting, or after trying to do something? What desktop?
You say the problem appeared, disappeared, re-appeared. I have put the M9 version in SRPM, but see that in Cauldron we have had since that v23.04:
 May 26 2023 version 23.04.1 (as in Mageia 9)
 Sep 23 2023 version 23.08.1
 Nov 15 2023 version 24.01.75
 Jan 1 2024 version 24.01.85
 Jan 23 2024 version 24.01.90
 Feb 6 2024 version 24.01.95
Can you relate the crash to new versions?

On M9, k3b-23.04.1-1.mga9, Xfce, no CD/DVD device, it launches OK, complains correctly that there is no suitable device, but does output this terminal error:
 $ k3b
kf.service.sycoca: The menu spec file ( "" ) contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix it.

Source RPM: Plasma => k3b-23.04.1-1.mga9.src.rpm
CC: (none) => lewyssmith

Comment 2 Frank Griffin 2024-02-21 02:08:50 CET
Hi Lewis,

This doesn't happen if there is no DVD drive attached, as the portions of the stacktrace mentioning "Device" might indicate.  Also, the desktop is Plasma.

I'm pretty sure this has nothing to do with k3b itself, but rather with the new Plasma(s).  It's annoying because on a cauldron-only system, you can no longer burn a boot iso for a network install.

When it worked after 6.1 but before it stopped working with 6.2, DVD burns worked but attempts to burn CD boot isos failed claiming the writer couldn't open the drive in spite of the fact that the userid was in both the cdrecord and cdwriter groups, and even if I forced the permissions on /dev/sr0 to 777.  But this is probably unrelated, and it flipped to the segfault before I could diagnose it properly.
Comment 3 Lewis Smith 2024-02-24 17:52:15 CET
I imagine your Plasma 6.x numbers are equivalent to kf6 .

Your previous comment indicates that k3b worked OK for Plasma 6.1, but only partially for 6.2: "DVD burns worked but attempts to burn CD boot isos failed claiming the writer couldn't open the drive".
Now you say simply it crashes, but it would help to know in what circumstance; can the bug title be more precise?
Does the partial working still work?
Does it crash always (say on startup)?
Does it crash only when you ask it to burn a CD boot iso?
Comment 4 Frank Griffin 2024-02-24 18:40:12 CET
These are different bugs, I'm pretty sure.  The one associated with this report is an unconditional crash at startup if an optical drive is attached (in this case a USB DVD drive).  The crash only occurs if the drive contains a CD, not when it's empty. When the drive is empty, k3b comes up normally, but when a CD is inserted, the crash occurs at that point.

I'll work on the permission bug once we're past this.  The 6.1/6.2 business was that it crashed under 6.1 initially, then stopped crashing, and then started again with 6.2.
Comment 5 Lewis Smith 2024-02-24 19:27:22 CET
Thanks for the clarifications.

Unsure whether this is k3b or Plasma, assigning initially to NicolasL for the application; pass it to KDE/Plasma maintainers if you see fit.

Assignee: bugsquad => mageia
CC: lewyssmith => (none)
Summary: k3b segfaults => k3b segfaults when a CD/DVD is [inserted] in the drive

Comment 6 Frank Griffin 2024-02-28 16:34:08 CET
Running k3b from a terminal window in LXDE gives the same crash, so the problem appears to be in k3b rather than Plasma.