Options to send/upload log file along with minidump file in linux

329 views
Skip to first unread message

Karthik H M

unread,
Nov 3, 2016, 5:40:21 AM11/3/16
to google-breakpad-discuss
Hi,

I want to send/upload the log file as additional info to the server along with minidump file. This is on Linux platform. Is this option available for Linux? I see that in src/client/mac/sender/uploader.mm, few lines suggest uploading log file along with minidump file. Is this feature available on mac working?
Do we have any other option (for Linux platform) in breakpad to upload log file to the server along with minidump?

Thanks.
Karthik

Ted Mielczarek

unread,
Nov 3, 2016, 9:08:38 AM11/3/16
to google-brea...@googlegroups.com
Hi Karthik,

I don't know which code you're using, but the HTTPUpload class in the Breakpad repository allows passing a map of files where the keys are the HTTP POST field name and the values are the paths to the files on disk:

It doesn't look like GoogleCrashdumpUploader supports this.

-Ted

Primiano Tucci

unread,
Nov 3, 2016, 9:36:16 AM11/3/16
to google-brea...@googlegroups.com
AFAIK minidumps don't support attaching additional stuff.
In chrome we deal with that at the uploader level, in the sense that we send other files together alongside minidump and the google crash sever supports that. But that has nothing to do with breakpad, modulo the fact that the uploader code that talks to Google servers might live in the same directory.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-breakpad-discuss.
For more options, visit https://groups.google.com/d/optout.

Mike Frysinger

unread,
Nov 3, 2016, 11:32:29 AM11/3/16
to google-brea...@googlegroups.com
minidumps can have anything attached to them, but they're usually non-standard.  otherwise we do as you say -- post the log files alongside the minidump.
-mike

On Thu, Nov 3, 2016 at 6:36 AM, Primiano Tucci <prim...@chromium.org> wrote:
AFAIK minidumps don't support attaching additional stuff.
In chrome we deal with that at the uploader level, in the sense that we send other files together alongside minidump and the google crash sever supports that. But that has nothing to do with breakpad, modulo the fact that the uploader code that talks to Google servers might live in the same directory.
On Thu, Nov 3, 2016 at 1:08 PM Ted Mielczarek <t...@mielczarek.org> wrote:

On Thu, Nov 3, 2016, at 05:40 AM, Karthik H M wrote:
Hi,

I want to send/upload the log file as additional info to the server along with minidump file. This is on Linux platform. Is this option available for Linux? I see that in src/client/mac/sender/uploader.mm, few lines suggest uploading log file along with minidump file. Is this feature available on mac working?
Do we have any other option (for Linux platform) in breakpad to upload log file to the server along with minidump?

Thanks.
Karthik

Hi Karthik,

I don't know which code you're using, but the HTTPUpload class in the Breakpad repository allows passing a map of files where the keys are the HTTP POST field name and the values are the paths to the files on disk:

It doesn't look like GoogleCrashdumpUploader supports this.

-Ted

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-breakpad-discuss@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-breakpad-discuss@googlegroups.com.

Karthik H M

unread,
Nov 4, 2016, 10:40:52 AM11/4/16
to google-breakpad-discuss
Thanks for your inputs.
I tried to use the HTTPUpload class for uploading the log file.

Also, I'm following the below link for my breakpad integration.

By referring this link I'm creating a .cpp file by adding the said functionalities. I'm creating a dynamic library from this source file and linking it to the processes which uses breakpad. I'm able to upload the minidump file using GoogleCrashDumpUploader in the minidump call back. 
Similarly, I tried to upload the log file using HTTPUpload in the same call back. Here, dynamic library creation is successful. But when I try to link this library to other processes, I'm getting the link error saying undefined reference to google_breakpad::HTTPUpload::SendRequest. I'm linking libbreakpad_client.a to my dynamic library. But still I'm getting this error. I tried directly linking libbreakpad_client.a to my process. Still the link error persists.
How to link symbols of http_upload.cc to my process? Am I missing something here?
Please suggest.

Thanks,
Karthik


On Thursday, 3 November 2016 21:02:29 UTC+5:30, Mike Frysinger wrote:
minidumps can have anything attached to them, but they're usually non-standard.  otherwise we do as you say -- post the log files alongside the minidump.
-mike
On Thu, Nov 3, 2016 at 6:36 AM, Primiano Tucci <prim...@chromium.org> wrote:
AFAIK minidumps don't support attaching additional stuff.
In chrome we deal with that at the uploader level, in the sense that we send other files together alongside minidump and the google crash sever supports that. But that has nothing to do with breakpad, modulo the fact that the uploader code that talks to Google servers might live in the same directory.
On Thu, Nov 3, 2016 at 1:08 PM Ted Mielczarek <t...@mielczarek.org> wrote:

On Thu, Nov 3, 2016, at 05:40 AM, Karthik H M wrote:
Hi,

I want to send/upload the log file as additional info to the server along with minidump file. This is on Linux platform. Is this option available for Linux? I see that in src/client/mac/sender/uploader.mm, few lines suggest uploading log file along with minidump file. Is this feature available on mac working?
Do we have any other option (for Linux platform) in breakpad to upload log file to the server along with minidump?

Thanks.
Karthik

Hi Karthik,

I don't know which code you're using, but the HTTPUpload class in the Breakpad repository allows passing a map of files where the keys are the HTTP POST field name and the values are the paths to the files on disk:

It doesn't look like GoogleCrashdumpUploader supports this.

-Ted

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

Primiano Tucci

unread,
Nov 4, 2016, 10:52:11 AM11/4/16
to google-breakpad-discuss

there is something I miss in all this : are you trying to reuse the http uploader as-is? that will send data to Google servers and you have no way to fetch it back


To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.

Karthik H M

unread,
Nov 7, 2016, 9:47:22 AM11/7/16
to google-breakpad-discuss
I'm using the http uploader by passing the our local sever's url and log file path as parameters. This does't upload the file to Google server, right? For http uploader I'm setting empty string values to proxy, proxy_user_pwd and ca_certificate. 
My current implementation in the dumpCallback is that, I'm trying to upload both minidump and log file. i.e calling google_breakpad::GoogleCrashdumpUploader->Upload(), then calling HTTPUpload::SendRequest() by passing same server's url to both of these functions. But I could see only minidump being uploaded and not log file. We are using both socorro and also mini-breakpad-server for our experiments. Does the server need to be configured to receive the log file? or Am I missing something on the client side?
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.

Primiano Tucci

unread,
Nov 7, 2016, 9:51:51 AM11/7/16
to google-brea...@googlegroups.com
On Mon, Nov 7, 2016 at 3:47 PM Karthik H M <hmka...@gmail.com> wrote:
I'm using the http uploader by passing the our local sever's url and log file path as parameters. This does't upload the file to Google server, right?
Ahh, got it, right.
 
For http uploader I'm setting empty string values to proxy, proxy_user_pwd and ca_certificate. 
My current implementation in the dumpCallback is that, I'm trying to upload both minidump and log file. i.e calling google_breakpad::GoogleCrashdumpUploader->Upload(), then calling HTTPUpload::SendRequest() by passing same server's url to both of these functions.
One thing that I don't get is: where do you pass the log file to? as a 2nd upload call?
 
But I could see only minidump being uploaded and not log file. We are using both socorro and also mini-breakpad-server for our experiments. Does the server need to be configured to receive the log file? or Am I missing something on the client side?

Did you check (tcpdump or similar) that you actually see the client doing two HTTP requests? 

To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.

To post to this group, send email to google-brea...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-breakpad-discuss.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.

Karthik H M

unread,
Nov 8, 2016, 9:54:25 AM11/8/16
to google-breakpad-discuss


On Monday, 7 November 2016 20:21:51 UTC+5:30, Primiano Tucci wrote:
On Mon, Nov 7, 2016 at 3:47 PM Karthik H M <hmka...@gmail.com> wrote:
I'm using the http uploader by passing the our local sever's url and log file path as parameters. This does't upload the file to Google server, right?
Ahh, got it, right.
 
For http uploader I'm setting empty string values to proxy, proxy_user_pwd and ca_certificate. 
My current implementation in the dumpCallback is that, I'm trying to upload both minidump and log file. i.e calling google_breakpad::GoogleCrashdumpUploader->Upload(), then calling HTTPUpload::SendRequest() by passing same server's url to both of these functions.
One thing that I don't get is: where do you pass the log file to? as a 2nd upload call?
Yes, log file is being passed to 2nd upload call i.e HTTP::SendRequest(). 
 
But I could see only minidump being uploaded and not log file. We are using both socorro and also mini-breakpad-server for our experiments. Does the server need to be configured to receive the log file? or Am I missing something on the client side?

Did you check (tcpdump or similar) that you actually see the client doing two HTTP requests? 
Yes, I checked using tcpdump. I can see 2 HTTP requests being received on server.
I think I can upload any text files which provides additional information such as log file (log.txt) or bt file (backtrace file that gets generated after a crash). Does the file name matters on the client side? or is this problem with respect to server configuration? Does the server need to be configured to receive the additional info in terms of log file? I'm not sure what is cause for log file not being uploaded.

To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.

To post to this group, send email to google-brea...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-breakpad-discuss.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.

Mike Frysinger

unread,
Nov 8, 2016, 10:01:41 AM11/8/16
to google-brea...@googlegroups.com
if it helps, we just use `curl` in CrOS.

you can try coming up with a `curl` command that works, and then compare the HTTP requests that work vs the ones that don't.  pretty sure you need to include everything in a single HTTP request -- multiple ones won't work.
-mike

To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsubscr...@googlegroups.com.

To post to this group, send email to google-brea...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-breakpad-discuss.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsubscr...@googlegroups.com.

To post to this group, send email to google-brea...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-breakpad-discuss.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-discuss+unsub...@googlegroups.com.
To post to this group, send email to google-breakpad-discuss@googlegroups.com.

Ted Mielczarek

unread,
Nov 8, 2016, 2:42:02 PM11/8/16
to google-brea...@googlegroups.com

On Tue, Nov 8, 2016, at 09:54 AM, Karthik H M wrote:


On Monday, 7 November 2016 20:21:51 UTC+5:30, Primiano Tucci wrote:
On Mon, Nov 7, 2016 at 3:47 PM Karthik H M <hmka...@gmail.com> wrote:
I'm using the http uploader by passing the our local sever's url and log file path as parameters. This does't upload the file to Google server, right?
Ahh, got it, right.
 
For http uploader I'm setting empty string values to proxy, proxy_user_pwd and ca_certificate. 
My current implementation in the dumpCallback is that, I'm trying to upload both minidump and log file. i.e calling google_breakpad::GoogleCrashdumpUploader->Upload(), then calling HTTPUpload::SendRequest() by passing same server's url to both of these functions.
One thing that I don't get is: where do you pass the log file to? as a 2nd upload call?
Yes, log file is being passed to 2nd upload call i.e HTTP::SendRequest(). 
 
But I could see only minidump being uploaded and not log file. We are using both socorro and also mini-breakpad-server for our experiments. Does the server need to be configured to receive the log file? or Am I missing something on the client side?

Did you check (tcpdump or similar) that you actually see the client doing two HTTP requests? 
Yes, I checked using tcpdump. I can see 2 HTTP requests being received on server.
I think I can upload any text files which provides additional information such as log file (log.txt) or bt file (backtrace file that gets generated after a crash). Does the file name matters on the client side? or is this problem with respect to server configuration? Does the server need to be configured to receive the additional info in terms of log file? I'm not sure what is cause for log file not being uploaded.

Unfortunately server configuration is probably out of scope for everyone here. I can tell you that the Firefox crash reporter client, when uploading to our Socorro server, does one HTTP POST using the HTTPUpload::SendRequest method, and passes any extra files along in that same request:

where gFiles comes from here:

-Ted

Karthik H M

unread,
Nov 15, 2016, 7:48:49 AM11/15/16
to google-breakpad-discuss
Thanks. That was helpful.
Reply all
Reply to author
Forward
0 new messages