Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#2865 closed defect (fixed)

OMEdit crash reports needs better handling

Reported by: Adrian Pop Owned by: Adeel Asghar
Priority: high Milestone: 1.9.4
Component: OMEdit Version: trunk
Keywords: Cc: Martin Sjölund, Adeel Asghar

Description

We get emails like these which are useless

Please attach the following files alongwith your bug description in your
crash report,

1. /tmpomeditcommands.log
2. /tmpopenmodelica.omc.output.OMEdit
3. /tmpopenmodelica.stacktrace.OMEdit

People never attach anything.

I suggest we do something like this:

  • create an SVN or GIT repository on openmodelica.org or github
  • add a user that can write to it
  • svn commit or git commit to it a zipped crash report from OMEdit with an unique filename (UUID.zip).

What do you think about this? Any comments?

Side note: The paths in the email are wrong, should be tmp/ and I'm not sure about "alongwith" :)

Attachments (2)

server.py (1.6 KB ) - added by Martin Sjölund 10 years ago.
test.py (480 bytes ) - added by Martin Sjölund 10 years ago.

Download all attachments as: .zip

Change History (29)

comment:1 by Adrian Pop, 10 years ago

Summary: OMEdit crashes reports needs better handlingOMEdit crash reports needs better handling

comment:2 by Martin Sjölund, 10 years ago

I have suggested something similar in the past. My choice was http upload though.

comment:3 by Adeel Asghar, 10 years ago

I fixed the paths in r22621.

in reply to:  description comment:4 by Adeel Asghar, 10 years ago

Replying to adrpo:

We get emails like these which are useless

Please attach the following files alongwith your bug description in your
crash report,

1. /tmpomeditcommands.log
2. /tmpopenmodelica.omc.output.OMEdit
3. /tmpopenmodelica.stacktrace.OMEdit

People never attach anything.

I suggest we do something like this:

  • create an SVN or GIT repository on openmodelica.org or github
  • add a user that can write to it
  • svn commit or git commit to it a zipped crash report from OMEdit with an unique filename (UUID.zip).

It means the user have to install SVN/Git in order to send the crash report, right?

comment:5 by Martin Sjölund, 10 years ago

No SVN/GIT installation is needed as long as you send the correct http commands ;)
Simply uploading via https is simpler though. We do not need or want version control for this. We want to be able to delete logs once we have gone through them, or to let the user himself delete the files if he no longer wants them available.

in reply to:  5 ; comment:6 by Adeel Asghar, 10 years ago

Replying to sjoelund.se:

No SVN/GIT installation is needed as long as you send the correct http commands ;)
Simply uploading via https is simpler though. We do not need or want version control for this. We want to be able to delete logs once we have gone through them, or to let the user himself delete the files if he no longer wants them available.

We can use http upload. Qt has a class for it QHttp http://qt-project.org/doc/qt-4.8/qhttp.html.
Create a form in php, put it somewhere in openmodelica.org server, prepare the data in OMEdit and post it to the php form.

By doing this we might become vulnerable to spam emails. How can we handle spams in this way?

comment:7 by Adeel Asghar, 10 years ago

A little bit time consuming but comprehensive solution is to write a SMTP class in Qt.

in reply to:  7 comment:8 by Martin Sjölund, 10 years ago

Replying to adeas31:

A little bit time consuming but comprehensive solution is to write a SMTP class in Qt.

No. You cannot do this. Most people are firewalled away from being able to run mail servers.

in reply to:  6 comment:9 by Martin Sjölund, 10 years ago

Replying to adeas31:

By doing this we might become vulnerable to spam emails. How can we handle spams in this way?

Reject any email that does not contain a "secret" key and the exact files OMEdit uploads.

comment:10 by Adrian Pop, 10 years ago

Nah. I would *NEVER EVER* use openmodelica.org for this or one of our test or build servers. Is too much of a security risk, people can upload anything and do DOS.

That's why I would use github, we only need to put git.exe in the installation and we are done.
If people find the user that OMEdit uses to upload stuff then they will upload crap or do DOS on github not our servers.

We could also probably use something like Google drive and upload there.

Alternatively, we could resurrect the old omeweb server and use that with https upload.

in reply to:  10 comment:11 by Martin Sjölund, 10 years ago

Replying to adrpo:

That's why I would use github, we only need to put git.exe in the installation and we are done.

No. "You must be a human. Accounts registered by "bots" or other automated methods are not permitted."

If people find the user that OMEdit uses to upload stuff then they will upload crap or do DOS on github not our servers.

So what? You make it upload to somewhere that is only accessible to administrators and is cleaned out automatically.

we could resurrect the old omeweb server and use that with https upload.

What is the difference from using dev.openmodelica.org or similar? It's not like a lot of tools will search the web for c++ code to find some url with a magic key that uploads 3 specific named text-files over https, right?

comment:12 by Adrian Pop, 10 years ago

Yeah, I forgot about dev.openmodelica.org. Using dev would be fine.

by Martin Sjölund, 10 years ago

Attachment: server.py added

by Martin Sjölund, 10 years ago

Attachment: test.py added

comment:13 by Martin Sjölund, 10 years ago

I played for a little bit and ended up with the following python-scripts. Adding more checks would not be hard. The output directory could be in www-pub password-protected or accessible sftp-only. API keys or spam detection can be added as an option.

comment:14 by Adrian Pop, 10 years ago

Cool, we can try this. Note that the file names have changed since yesterday:

omeditcommands.mos
omeditcommunication.log
openmodelica.omc.output.OMEdit

comment:15 by Adrian Pop, 10 years ago

Adeel, I guess Qt has a http(s) request post class that we could use. Also, we could add more information like OMC version and OMEdit version as that is not available in any of these files.
Also, you need to ask for user's permission to send the files as they might contain private information.

comment:16 by Adrian Pop, 10 years ago

We also need to generate unique file names if we upload in the same directory. We could probably use UUID or something like that.

in reply to:  15 comment:17 by Adeel Asghar, 10 years ago

Replying to adrpo:

Adeel, I guess Qt has a http(s) request post class that we could use. Also, we could add more information like OMC version and OMEdit version as that is not available in any of these files.
Also, you need to ask for user's permission to send the files as they might contain private information.

Yes, Qt has QHttp class (as I mentioned earlier). I will try it. What will be post url?

in reply to:  16 comment:18 by Adeel Asghar, 10 years ago

Replying to adrpo:

We also need to generate unique file names if we upload in the same directory. We could probably use UUID or something like that.

I don't think we need it? Martin is generating unique file names in server.py. Check line 18,

prefix = time.strftime("%Y-%m-%d_%H:%M:%S")

comment:19 by Adrian Pop, 10 years ago

See test.py for the post url. I guess just for testing now.

comment:20 by Martin Sjölund, 10 years ago

You could also install the script in /var/www if you like, so you can tweak it yourself (add your own email, etc).

in reply to:  15 comment:21 by Martin Sjölund, 10 years ago

Replying to adrpo:

Adeel, I guess Qt has a http(s) request post class that we could use. Also, we could add more information like OMC version and OMEdit version as that is not available in any of these files.
Also, you need to ask for user's permission to send the files as they might contain private information.

Maybe reply-to email as well?

comment:22 by Per Östlund, 10 years ago

Cc: Per Östlund removed

comment:23 by Adeel Asghar, 10 years ago

From r22785 OMEdit uses the http upload approach for crash reports. The files are uploaded to the server and the crash report email contains the links of them.

comment:24 by Martin Sjölund, 10 years ago

You should get a permanent URL for it before the release ;)

comment:25 by Adeel Asghar, 10 years ago

Resolution: fixed
Status: newclosed

Done in r22797.

comment:26 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.9.4

It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.

comment:27 by Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.