[cups.development] notifier - Get-Job-Attributes client-error-bad-request

Rodger Devine rdevine at umich.edu
Tue May 4 13:52:27 PDT 2010


In article <5100-cups.development at news.easysw.com>,
 Michael Sweet <msweet at apple.com> wrote:

> On Apr 22, 2010, at 4:02 PM, Rodger Devine wrote:
> > ...
> > I'm using ps to monitor the virtual memory size of the notifier in bytes.
> 
> VSIZE isn't a great measurement number since it isn't just malloc use...
> 
> > A) running before new job-state-changed event occurs:
> > 
> > lp        8314  0.0  0.2   6712  2448 ?        S    Apr21   0:00 
> > /usr/lib/cups/notifier/jnotify jnotify
> > 
> > B) after previous subscription event occurs:
> > 
> > lp        8314  0.0  0.2   6724  2460 ?        S    Apr21   0:00 
> > /usr/lib/cups/notifier/jnotify jnotify 
> > 
> > And so forth. It grew to over 20 kb after running for over a day.
> > 
> > However, when I remove the following lines of code after the 
> > cupdsDoRequest call, this increase in memory usage does *not* occur, 
> > which has led me to believe there's some type of leak:
> > 
> >       if (response->request.status.status_code > IPP_OK_CONFLICT)
> >       {
> >          fprintf(stderr, "jnotify: %s\n", cupsLastErrorString());
> >          ippDelete(response);
> >          return (0);
> >       }
> > 
> > I can email you the entire source directly (~465 lines) if my code 
> > snippets aren't clear.
> 
> Maybe that would be the best place to start.
> 
> ________________________________________________________________________
> Michael Sweet, Senior Printing System Engineer, PWG Chair

Hi Michael,

I emailed you a copy of my source, but am not sure you received it 
and/or had a chance to take a look yet.

I've since noticed that when I submit a job (of any mime type), there 
are two job id's for each job being submitted. An intermediate job id, 
which appears to be created before the auto-typing process, and the one 
eventually returned via "notify-job-id":

Here is a snapshot of the notifier output:

A job is submitted and processed, which triggers the notifier:

....

May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] 
printer-is-accepting-jobs:    1
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] server-name:      
imnoangel

May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] jnotify: Job #1260 
does not exist!

....

In this case, the job id changes from #1260 to #2793:

May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] SERVERNAME:    
imnoangel
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] *jnotify output*
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] 
notify-subscribed-event:      job-created
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] notify-text:      Job 
created.
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] printer-name:     
zilch
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] notify-job-id:    2793
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] 
job-originating-user-name:    rdevine
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] job-name:      UM.pdf
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] job-size:      77824 
bytes
May  4 16:33:50 imnoangel cupsd[21463]: [Notifier] job-date:      
2010-05-04 16:33:50

Is this expected behavior? If so, what is the best way of handling this?

Rodger
University of Michigan




More information about the cups-devel mailing list