Bug 746601

Summary: Qt doesn't close orphaned file descriptors after printing
Product: [Fedora] Fedora Reporter: zeljko <zeljko>
Component: qtAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 14CC: itamar, jreznik, kevin, ltinkl, rdieter, rnovacek, smparrish, than
Target Milestone: ---Keywords: Patch, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qt-4.7.4-6.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-10 17:48:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description zeljko 2011-10-17 08:20:46 UTC
Description of problem:
Qt doesn't close file descriptors after printing.
So after passing ulimit -n application cannot open more files anymore,
must be killed.

Related to 
https://bugreports.qt.nokia.com/browse/QTBUG-14724
Fix is here (but unmerged for a year)
http://qt.gitorious.org/qt/qt/merge_requests/982

Version-Release number of selected component (if applicable):

qt-4.7.4-2.fc14.i686

How reproducible:
Just try to print something with some pure qt app (not KDE apps like kwrite)


Steps to Reproduce:
1.
After executing such simple code, you'll see in
your /proc/PROCID/fd/ orphaned symlinks eg.
/proc/PROCID/fd/25->/tmp/cupsXT76YUF (deleted)

so, my macine ulimit -n is 1024, and after printing cca 1000 files, there's
no chance to open another file.

void MainWin::TestMyPrinter() {
  /* just for testing .. */
  QPainter painter;  
  QPrinter printer(QPrinter::PrinterResolution); 
  QPrintDialog *dialog = new QPrintDialog(&printer, this);
     dialog->setWindowTitle(tr("Print Document"));  
  if (dialog->exec() == QDialog::Accepted){
    painter.begin(&printer);
    painter.drawText(200, 200, QString("Hello world"));
    painter.end();
    /* does not help */
    /* printer.~QPrinter(); */
  }
}
  
Additional info: please apply mentioned patch (http://qt.gitorious.org/qt/qt/merge_requests/982).

Comment 1 Kevin Kofler 2011-10-17 08:38:58 UTC
There hasn't been a qt4 package in Fedora for years, bugs must be filed against qt, not qt4. Reassigning.

Comment 2 zeljko 2011-10-17 08:45:31 UTC
Then remove it from the list of available components.

Comment 3 Kevin Kofler 2011-10-17 09:13:01 UTC
We can't do that. Every package that was ever in Fedora is listed as a Bugzilla component, they're only ever added, never removed.

Comment 4 zeljko 2011-10-17 09:30:36 UTC
ack.

Comment 5 zeljko 2011-10-17 14:20:22 UTC
FYI, rebuilded qt-4.7.4 with proposed patch and now it works like a charm, tested with bulk of 15000 files.

Comment 6 Rex Dieter 2011-10-17 14:48:29 UTC
Thanks!

Comment 7 Fedora Update System 2011-10-24 17:54:23 UTC
qt-4.7.4-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/qt-4.7.4-4.fc14

Comment 8 Fedora Update System 2011-10-24 17:54:49 UTC
qt-4.7.4-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/qt-4.7.4-4.fc15

Comment 9 Fedora Update System 2011-10-27 03:58:27 UTC
Package qt-4.7.4-4.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qt-4.7.4-4.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-14968
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2011-11-04 14:00:02 UTC
qt-4.7.4-6.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/qt-4.7.4-6.fc15

Comment 11 Fedora Update System 2011-11-10 17:48:19 UTC
qt-4.7.4-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 zeljko 2011-11-11 07:24:01 UTC
hm...I've updated last night machine @home, but only debuginfo package was updated, still got qt-4.7.4-2 (FC14).
Current machine already contains qt from testing, so not in updates at all.

Comment 13 Kevin Kofler 2011-11-11 16:02:38 UTC
Your mirror is probably not updated yet. Mirrors have the Fedora 16 release to mirror, it's a lot of stuff, so not all mirrors have managed to pull the latest updates from the master server yet.

Comment 14 Fedora Update System 2011-11-14 22:27:19 UTC
qt-4.7.4-6.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Red Hat Bugzilla 2013-10-04 00:21:18 UTC
Removing external tracker bug with the id '14724' as it is not valid for this tracker