<div dir="ltr">Hello,<div style>For the duplicate dir, the problem is that, when a duplicate dir is found... no data is uploaded.</div><div style>To test sosreport file upload, I've modified the configuration and reran my test using my simple loop.</div>
<div style>I get these logs:</div><div style><div>Mar  8 15:47:29  abrtd: Directory 'ccpp-2013-03-08-15:47:29-20599' creation detected</div><div>Mar  8 15:47:29  abrt[20607]: Saved core dump of pid 20599 (/bin/bash) to /var/spool/abrt/ccpp-2013-03-08-15:47:29-20599 (413696 bytes)</div>
<div>Mar  8 15:47:38  abrtd: Sending an email...</div><div>Mar  8 15:47:38  abrtd: Email was sent to: root@localhost</div><div>Mar  8 15:47:38 abrtd: New problem directory /var/spool/abrt/ccpp-2013-03-08-15:47:29-20599, processing</div>
<div>Mar  8 17:05:23 abrt[21793]: Saved core dump of pid 21781 (/bin/bash) to /var/spool/abrt/ccpp-2013-03-08-17:05:23-21781 (413696 bytes)</div><div>Mar  8 17:05:23  abrtd: Directory 'ccpp-2013-03-08-17:05:23-21781' creation detected</div>
<div>Mar  8 17:05:32  abrtd: Sending an email...</div><div>Mar  8 17:05:32  abrtd: Email was sent to: root@localhost</div><div>Mar  8 17:05:32  abrtd: Duplicate: UUID</div><div>Mar  8 17:05:32  abrtd: DUP_OF_DIR: /var/spool/abrt/ccpp-2013-03-08-15:47:29-20599</div>
<div>Mar  8 17:05:32  abrtd: Corrupted or bad directory '/var/spool/abrt/ccpp-2013-03-08-17:05:23-21781', deleting</div><div><br></div><div style>The problem is that on my spacewalk server, I only have the first data uploaded, and the crash count is not updated.</div>
<div style><br></div><div style>Is this the expected behavior?</div><div style><br></div><div style>Pierre</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/8 Pierre Casenove <span dir="ltr"><<a href="mailto:pcasenove@gmail.com" target="_blank">pcasenove@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks a lot for the information. Having this functionnality is great!<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Pierre</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/8 Milan Zazrivec <span dir="ltr"><<a href="mailto:mzazrivec@redhat.com" target="_blank">mzazrivec@redhat.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>> Thanks a lot, it works now... but I noticed 2 points:<br>
> 1) I've launched another test to validate the path. Here is the logs I had:<br>
> Mar  8 15:46:44 abrtd: Directory 'ccpp-<a href="tel:2013-03-08-15" value="+12013030815" target="_blank">2013-03-08-15</a>:46:44-20301' creation<br>
> detected<br>
> Mar  8 15:46:44  abrt[20327]: Saved core dump of pid 20301 (/bin/bash) to<br>
> /var/spool/abrt/ccpp-<a href="tel:2013-03-08-15" value="+12013030815" target="_blank">2013-03-08-15</a>:46:44-20301 (413696 bytes)<br>
> Mar  8 15:46:56  abrtd: Sending an email...<br>
> Mar  8 15:46:56  abrtd: Email was sent to: root@localhost<br>
> Mar  8 15:46:56  abrtd: Duplicate: UUID<br>
> Mar  8 15:46:56 abrtd: DUP_OF_DIR:<br>
> /var/spool/abrt/ccpp-<a href="tel:2013-03-07-15" value="+12013030715" target="_blank">2013-03-07-15</a>:29:42-3952<br>
> Mar  8 15:46:56 abrtd: Corrupted or bad directory<br>
> '/var/spool/abrt/ccpp-<a href="tel:2013-03-08-15" value="+12013030815" target="_blank">2013-03-08-15</a>:46:44-20301', deleting<br>
<br>
</div>Yes, when abrtd detects a duplicate crash, it deletes its crash directory and<br>
increases the 'count' in the original directory (the one that this crash is<br>
a duplicate of).<br>
<div><br>
> The folder "/var/spool/abrt/ccpp-<a href="tel:2013-03-07-15" value="+12013030715" target="_blank">2013-03-07-15</a>:29:42-3952" is the one that<br>
> were created when spacewalk-abrt crashed.<br>
> When I've generated a new crash today with your patch, spacewalk-abrt<br>
> couldn't upload the data and deleted this folder.<br>
<br>
</div>abrtd won't execute spacewalk-abrt --report $DUMP_DIR when it detects<br>
duplicates (i.e. it won't re-upload the whole stuff for duplicates). Instead<br>
it launches spacewalk-abrt --update-count $DUMP_DIR which just increases<br>
the count number.<br>
<div><br>
> I've deleted folder "/var/spool/abrt/ccpp-<a href="tel:2013-03-07-15" value="+12013030715" target="_blank">2013-03-07-15</a>:29:42-3952" and<br>
> regenerated a crash... everything was working<br>
><br>
> 2) sosreport.tar.xz has not been uploaded to my spacewalk server. The file<br>
> size limit is set to 2048 and the file is 1.3MB.<br>
<br>
</div>This is correct. 2048 is a size limit in bytes (as stated on the org config<br>
web page).<br>
<span><font color="#888888"><br>
-MZ<br>
</font></span><div><div><br>
> 2013/3/8 Milan Zazrivec <<a href="mailto:mzazrivec@redhat.com" target="_blank">mzazrivec@redhat.com</a>><br>
><br>
> > > Hello list,<br>
> > > I've upgraded my spacewalk server to version 1.9 (rhel 5 pgsql).<br>
> > > I've updated spacewalk client binairies on a test client, and installed<br>
> > > spacewalk-abrt package.<br>
> > > I've rebooted both the server and the client.<br>
> > ><br>
> > > To test abrt crash upload functionnality, i've launched the following<br>
> > > compex script in background:<br>
> > > #!/bin/bash<br>
> > ><br>
> > > while :<br>
> > > do<br>
> > ><br>
> > >    sleep 1<br>
> > ><br>
> > > done<br>
> > ><br>
> > > Than, I killed it using kill -SIGSEGV 3952<br>
> > ><br>
> > > As expected, abrt detected the crash... but then spacewalk crashed!<br>
> > > Mar  7 15:29:42  abrt[3967]: Saved core dump of pid 3952 (/bin/bash) to<br>
> > > /var/spool/abrt/ccpp-<a href="tel:2013-03-07-15" value="+12013030715" target="_blank">2013-03-07-15</a>:29:42-3952 (413696 bytes)<br>
> > > Mar  7 15:29:42  abrtd: Directory 'ccpp-<a href="tel:2013-03-07-15" value="+12013030715" target="_blank">2013-03-07-15</a>:29:42-3952'<br>
> ><br>
> > creation<br>
> ><br>
> > > detected<br>
> > > Mar  7 15:29:50  abrtd: Sending an email...<br>
> > > Mar  7 15:29:50  abrtd: Email was sent to: root@localhost<br>
> > > Mar  7 15:29:51 abrtd: New problem directory<br>
> > > /var/spool/abrt/ccpp-<a href="tel:2013-03-07-15" value="+12013030715" target="_blank">2013-03-07-15</a>:29:42-3952, processing<br>
> > > Mar  7 15:29:51  abrtd: An error has occurred:<br>
> > > Mar  7 15:29:51  abrtd: Error communicating with server. The message<br>
> > > was: Mar  7 15:29:51  abrtd: While running 'abrt.create_crash': caught<br>
> > > Mar  7 15:29:51 tu-spa-d13 abrtd: exceptions.TypeError : expected a<br>
> > > character buffer object<br>
> > > Mar  7 15:29:51 tu-spa-d13 abrtd:<br>
> > > Mar  7 15:29:51 tu-spa-d13 abrtd: See /var/log/up2date for more<br>
> ><br>
> > information<br>
> ><br>
> > > In up2date log, I have:<br>
> > > <class 'up2date_client.up2dateErrors.CommunicationError'>: Error<br>
> > > communicating with server. The message was:<br>
> > > While running 'abrt.create_crash': caught<br>
> > > exceptions.TypeError : expected a character buffer object<br>
> > ><br>
> > ><br>
> > > I've checked httpd error log, I found this:<br>
> > > [Thu Mar 07 15:29:51 2013] [error] Exception Handler Information<br>
> > > [Thu Mar 07 15:29:51 2013] [error] Traceback (most recent call last):<br>
> > > [Thu Mar 07 15:29:51 2013] [error]   File<br>
> > > "/usr/lib/python2.4/site-packages/spacewalk/server/apacheRequest.py",<br>
> ><br>
> > line<br>
> ><br>
> > > 122, in call_function<br>
> > > [Thu Mar 07 15:29:51 2013] [error]     response = apply(func, params)<br>
> > > [Thu Mar 07 15:29:51 2013] [error]   File<br>
> > > "/usr/share/rhn/server/handlers/xmlrpc/abrt.py", line 170, in<br>
> ><br>
> > create_crash<br>
> ><br>
> > > [Thu Mar 07 15:29:51 2013] [error]     server_crash_dir =<br>
> > > get_crash_path(str(server_org_id), str(self.server_id),<br>
> > > crash_data['crash']) [Thu Mar 07 15:29:51 2013] [error]   File<br>
> > > "/usr/lib/python2.4/site-packages/spacewalk/server/rhnLib.py", line<br>
> > > 218,<br>
> ><br>
> > in<br>
> ><br>
> > > get_crash_path<br>
> > > [Thu Mar 07 15:29:51 2013] [error]     if _is_secure_path(path):<br>
> > > [Thu Mar 07 15:29:51 2013] [error]   File<br>
> > > "/usr/lib/python2.4/site-packages/spacewalk/server/rhnLib.py", line<br>
> > > 211,<br>
> ><br>
> > in<br>
> ><br>
> > > _is_secure_path<br>
> > > [Thu Mar 07 15:29:51 2013] [error]     return not path.startswith(('/',<br>
> > > '../'))<br>
> > > [Thu Mar 07 15:29:51 2013] [error] TypeError: expected a character<br>
> > > buffer object<br>
> > ><br>
> > ><br>
> > > What am I doing wrong?<br>
> ><br>
> > Heya -- you're not doing anything wrong. This is a valid bug in<br>
> > spacewalk-backend which will show on a RHEL-5 Spacewalk (server) only.<br>
> ><br>
> > This is the fix you need on your server:<br>
> ><br>
> ><br>
> > <a href="http://git.fedorahosted.org/cgit/spacewalk.git/commit/?h=SPACEWALK-1.9&id" target="_blank">http://git.fedorahosted.org/cgit/spacewalk.git/commit/?h=SPACEWALK-1.9&id</a><br>
> > =1d43a4da660df4ba4c8b4c85339bfbda65c0d049<br>
> ><br>
> > These are spacewalk-backend packages for Spacewalk 1.9 containing<br>
> > the fix above:<br>
> ><br>
> > <a href="http://koji.spacewalkproject.org/koji/buildinfo?buildID=30602" target="_blank">http://koji.spacewalkproject.org/koji/buildinfo?buildID=30602</a><br>
> ><br>
> > I'll try to get these packages to Spacewalk 1.9 repo in a near future.<br>
> ><br>
> > Thank you for your report.<br>
> > -Milan Zázrivec<br>
> ><br>
> > _______________________________________________<br>
> > Spacewalk-list mailing list<br>
> > <a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
> > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
<br>
_______________________________________________<br>
Spacewalk-list mailing list<br>
<a href="mailto:Spacewalk-list@redhat.com" target="_blank">Spacewalk-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>