Git Product home page Git Product logo

Comments (24)

MaxLeb avatar MaxLeb commented on May 26, 2024 1

Any news on that ?

We are starting to deploy our version with the SDK but the missing release is a bit of an handicap right now.

from sentry-native.

jan-auer avatar jan-auer commented on May 26, 2024

Thanks, this is definitely intended to work. We’re currently investigating issues with setting scope information on crashes. It looks like this may have the same cause.

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

I cannot reproduce this on master.

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

I forgot to tell you that I was using the latest release available on GitHub

Do you want me to try it with master ? I can easily do that.

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

I have tried to build master but i get this when trying to make sentry_crashpad:

==== Building crashpad_util (release) ====
==== Building crashpad_minichromium_base (release) ====
==== Building crashpad_client (release) ====
==== Building crashpad_snapshot (release) ====
==== Building crashpad_minidump (release) ====
make[1]: *** No rule to make target `../crashpad/build/crashpad/client/annotation.cc', needed by `obj/Release/crashpad_client/annotation.o'.  Stop.
make: *** [crashpad_client] Error 2
make: *** Waiting for unfinished jobs....
make[1]: *** No rule to make target `../crashpad/build/crashpad/third_party/mini_chromium/mini_chromium/base/debug/alias.cc', needed by `obj/Release/crashpad_minichromium_base/alias.o'.  Stop.
make: *** [crashpad_minichromium_base] Error 2
make[1]: *** No rule to make target `../crashpad/build/crashpad/minidump/minidump_annotation_writer.cc', needed by `obj/Release/crashpad_minidump/minidump_annotation_writer.o'.  Stop.
make: *** [crashpad_minidump] Error 2
make[1]: *** No rule to make target `../crashpad/build/crashpad/snapshot/annotation_snapshot.cc', needed by `obj/Release/crashpad_snapshot/annotation_snapshot.o'.  Stop.
make: *** [crashpad_snapshot] Error 2
make[1]: *** No rule to make target `../crashpad/build/crashpad/util/mach/child_port.defs', needed by `gen/util/mach/child_portUser.c'.  Stop.
make[1]: *** Waiting for unfinished jobs....
Creating obj/Release/crashpad_util

also here is what i see in Sentry just so you understand what I expect to see
Capture d’écran 2019-11-14 à 11 03 18

You can see that it does not mention any release and the user seems empty.
When scrolling down I do not see any extra.

Also, when sneak peeking the JSON file, I do not find anything about the user or other things. Iwas expecting to see "John Doe" somewhere.

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

I will investigate this. The release missing was also reported here: #73.

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

So generally release information and these are sent as a secret attachment behind the scenes (named __sentry-event). I wonder if the transmission fails for some reason.

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

@MaxLeb i will investigate this today but does this also happen with the master version? What platform is this on?

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

I absolutely cannot reproduce this but this must be a bug on our side. I'm wondering right now if for some reason that attachment writing fails.

There are two things that I can imagine are going wrong but it would be easier to check on the master version. Either flush_scope fails to write the internal attachment with that data or the crashpad uploader fails to upload for some reason.

Would it be possible for you to add some debug prints to this line and see if the file is actually being written: https://github.com/getsentry/sentry-native/blob/master/src/backends/crashpad_backend.cpp#L44

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

I got the SDK to build on master with crashpad (I was missing the make fetch_crashpad), i will make the tests you wanted and let you know the results

So..with master

1 - I still do not have the "release" field in the crash report.
2- When i add SENTRY_LOGF arround the line you told me, I do not see any logs..should they be poping in my app logs ? or are they redirected ?

however I have those logs:

[39046:145473:20191121,113555.568926:WARNING system_snapshot_mac.cc:42] sysctlbyname kern.nx: No such file or directory (2)
[39046:145473:20191121,113555.579298:ERROR file_io_posix.cc:147] open HIDDEN_PATH/crashpad/sentry-runs/1574332539-2032930717/__sentry-breadcrumb1: No such file or directory (2)
[39046:145473:20191121,113555.579415:ERROR file_io_posix.cc:147] open HIDDEN_PATH/sentry-runs/1574332539-2032930717/__sentry-breadcrumb2: No such file or directory (2)
[39046:145473:20191121,113555.579513:ERROR file_io_posix.cc:147] open HIDDEN_PATH/crashpad/sentry-runs/1574332539-2032930717/__sentry-event: No such file or directory (2)
[39046:145473:20191121,113555.596305:WARNING crash_report_exception_handler.cc:259] UniversalExceptionRaise: (os/kern) failure (5)

I think this isn't it ?

[39046:145473:20191121,113555.579513:ERROR file_io_posix.cc:147] open HIDDEN_PATH/crashpad/sentry-runs/1574332539-2032930717/__sentry-event: No such file or directory (2)

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

The logs show up when the sdk is initialized with debug set to true in the options (sentry_options_set_debug).

Looks like the writing of the event file (flush_scope) never succeeded. Does the folder HIDDEN_PATH/crashpad/sentry-runs/1574332539-2032930717 exist for you? Also is there a weird character or space in HIDDEN_PATH?

from sentry-native.

conradjones avatar conradjones commented on May 26, 2024

Watch out generating a crash like that in release builds, clang at least will try to remove it as it's undefined behaviour, with my testing the symbolication was completely incorrect due to clang removing the UB.

asm("ud2"); although obviously intel specific will work when testing a release build.

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

was already thinking of adding a test crash function that is more correct than what we're doing here.

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

Ok so here is what i have for attachments (removing breadcrumbs and such):

[sentry] >>>> __sentry-event / /Users/maximeleblanc/.shadow/crashpad/sentry-runs/1574334003-1122828092/__sentry-event

[sentry] >>>> shadow.log / /Users/maximeleblanc/.shadow/shadow.log

shadow.log is well pushed but i do not have any folder named /Users/maximeleblanc/.shadow/crashpad/sentry-runs/

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

I suppose our recursive dictionary creation code fails then a bit higher up: current_run_folder.create_directories();

Will investigate.

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

With your commit: [sentry] mkdir () failed: 2, somehow the path seems empty

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

I got it to create the folder.

The patch consists in :

1 - First check if it does start with a /
2 - iterate starting at p + 1

So I think your code is good for relative path but not for absolute path ;)

Now I still do not have __sentry-event file in the folder.

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

So I got lost in your code but what I found out is that if I put a log in flush_scope it never appears.
So __sentry-event is never open and filled.

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

Hi guys, any news ?

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

Sorry to get back on the matter but this is a real blocker for us as the SDK is completly unusefull.
Do you have an ETA ?
Not having the release in the bug reports makes it sadly useless.

Can you point to me how I could write this __sentry_event file so it works.

from sentry-native.

mitsuhiko avatar mitsuhiko commented on May 26, 2024

Sorry for the lack of activity on this. Can you share with me the code for how you initialize the SDK? I have been trying to reproduce this to no avail.

I fixed one potential bug on master two days ago where dictionary creation would fail if absolute paths were passed on posix systems.

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

Yes here is how I initialize it.

    sentry_options_t* options = sentry_options_new();
    sentry_options_add_attachment(
        options, "shadow.log", g_ShadowLogger.logFilePath().c_str());
    sentry_options_set_dsn(
        options, "https://[email protected]/1362965");
    sentry_options_set_release(options, PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR);

    std::string handler_path;
    ShadowGetExePath(&handler_path);
    handler_path += "/../Frameworks/crashpad_handler";
    sentry_options_set_handler_path(options, handler_path.c_str());

    std::string db_path;
    GetWriteLocation(&db_path);
    db_path += "/crashpad";

    sentry_options_set_database_path(options, db_path.c_str());
    sentry_init(options);

Indeed we are using absolute path so I guess that one is fixed.

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

I can confirm now that on master the folder is well created.
However..still
[15606:437896:20191128,145153.209345:ERROR file_io_posix.cc:147] open /Users/maximeleblanc/.shadow/crashpad/sentry-runs/1574949108-1578629558/__sentry-event: No such file or directory (2)

If you want to live debug and have me make changes in the sdk to get more info I'm available and ready to do it!

from sentry-native.

MaxLeb avatar MaxLeb commented on May 26, 2024

I got it to work!

I am running a few tests but at a first glance, here is what is needed:

  • create options
  • set everything needed in options (release, dsn
  • init sentry with `options

AND (and I guess this should not be a requirement), you need to at least set one extra so flush_scope is at least called once.

sentry_init should dump everything in __sentry_event otherwise it will be empty.

from sentry-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.