zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

Trilium crashes on Linux Mint 19.3 all the time during startup of app #1536

Closed kalmigs closed 3 years ago

kalmigs commented 3 years ago

Trilum Version: v0.45.8 (also happens in v0.45.7)

Issue: When I startup trilium it crashes Cinnamon desktop of Linux Mint 19.3

Screenshot of crash popup trilium-crash

system info:

Host: name-mint Kernel: 5.4.0-60-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 
Desktop: Cinnamon 4.4.8 wm: muffin dm: LightDM Distro: Linux Mint 19.3 Tricia 
base: Ubuntu 18.04 bionic 

log:

24:21:09.520 Notes deleted: 2, not deleted 382
00:21:09.522 Note revisions deleted: 0, not deleted 50
00:21:09.522 Branches deleted: 93, not deleted 406
00:21:09.523 Attributes deleted: 5, not deleted 295
00:21:09.523 API tokens deleted: 0, not deleted 0
00:21:09.543 All consistency checks passed (took 23ms)
00:45:36.099 PUT /api/notes/wCy6NTHyctwZ/attributes took 0ms
00:47:46.224 PUT /api/notes/wCy6NTHyctwZ/attributes took 3ms
00:47:54.244 PUT /api/notes/wCy6NTHyctwZ/attributes took 1ms
01:21:09.521 Notes deleted: 2, not deleted 382
01:21:09.521 Note revisions deleted: 0, not deleted 50
01:21:09.522 Branches deleted: 93, not deleted 406
01:21:09.522 Attributes deleted: 5, not deleted 295
01:21:09.522 API tokens deleted: 0, not deleted 0
01:21:09.545 All consistency checks passed (took 24ms)
01:33:16.723 PUT /api/notes/wCy6NTHyctwZ/attributes took 1ms
18:30:02.905 DB size: 3719 KB
18:30:04.965 App HTTP server starting up at port 37840
18:30:04.965 {
  "appVersion": "0.45.8",
  "dbVersion": 170,
  "syncVersion": 16,
  "buildDate": "2021-01-11T22:29:31+01:00",
  "buildRevision": "369274ead75947a68bf7bbb5ab1e784e81521030",
  "dataDirectory": "/home/name/Documents/Notes/trilium-data",
  "clipperProtocolVersion": "1.0"
}
18:30:04.983 CPU model: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz, logical cores: 4 freq: 2319 Mhz
18:30:04.986 Listening on port 37840
18:30:05.934 Registered global shortcut Ctrl+Alt+P for action createNoteIntoDayNote
18:30:06.890 Generated CSRF token NfErxiKV-Z6K7zgIrAkoJdAua7W0vdq5Efvc with secret _csrf=u_ycaD_WoDJUbCWLnprAKle1; Path=/
18:30:06.910 Slow query took 20ms: SELECT COALESCE(MAX(id), 0) FROM entity_changes
18:30:06.952 Slow query took 41ms: SELECT notes.* FROM notes JOIN attributes USING(noteId) 
          WHERE notes.isDeleted = 0 AND attributes.isDeleted = 0 AND attributes.name IN (?, ?) ORDER BY position
18:30:07.078 Slow GET / took 190ms
18:30:10.202 Slow recursive query took 147ms.
18:30:10.251 Slow GET /api/tree took 198ms
18:30:10.258 GET /api/options took 1ms
18:30:10.268 GET /api/keyboard-actions took 2ms
18:30:10.272 GET /api/keyboard-shortcuts-for-notes took 0ms
18:30:10.281 GET /api/script/widgets took 8ms
18:30:10.296 Slow GET /api/notes/download/EG8xQgyQKgRI took 10ms
18:30:10.332 Slow query took 27ms: SELECT content, hash FROM note_contents WHERE noteId = ?
18:30:10.332 Slow GET /api/notes/download/FICFhwE31pSj took 27ms
18:30:10.337 POST /api/tree/load took 1ms
18:30:10.406 POST /api/tree/load took 1ms
18:30:10.416 POST /api/tree/load took 0ms
18:30:11.720 Slow query took 370ms: SELECT content, hash FROM note_contents WHERE noteId = ?
18:30:11.723 Slow GET /api/notes/wCy6NTHyctwZ took 372ms
18:30:12.372 Slow GET /api/similar-notes/wCy6NTHyctwZ took 19ms
18:30:12.456 Slow query took 82ms: 
        SELECT note_revisions.*,
               LENGTH(note_revision_contents.content) AS contentLength
        FROM note_revisions
        JOIN note_revision_contents ON note_revisions.noteRevisionId = note_revision_contents.noteRevisionId 
        WHERE noteId = ? 
          AND isErased = 0
        ORDER BY utcDateCreated DESC
18:30:12.457 Slow GET /api/notes/wCy6NTHyctwZ/revisions took 83ms
18:30:12.497 Slow query took 30ms: SELECT content, hash FROM note_contents WHERE noteId = ?
18:30:12.520 Slow query took 22ms: SELECT content, hash FROM note_contents WHERE noteId = ?
18:30:12.521 Slow GET /api/script/startup took 54ms
18:30:12.524 POST /api/tree/load took 1ms
18:30:12.526 POST /api/tree/load took 1ms
18:30:12.530 POST /api/tree/load took 1ms
18:30:12.537 POST /api/tree/load took 1ms
18:30:12.539 POST /api/tree/load took 1ms
18:30:12.544 POST /api/tree/load took 1ms
18:30:12.547 POST /api/tree/load took 1ms
18:30:12.714 POST /api/notes/wCy6NTHyctwZ/link-map took 2ms
18:30:16.477 Slow POST /api/recent-notes took 136ms
18:30:16.935 POST /api/recent-notes took 1ms
18:30:24.401 Notes deleted: 2, not deleted 382
18:30:24.402 Note revisions deleted: 0, not deleted 50
18:30:24.402 Branches deleted: 93, not deleted 406
18:30:24.403 Attributes deleted: 5, not deleted 295
18:30:24.403 API tokens deleted: 0, not deleted 0
18:30:24.461 Slow query took 50ms: 
                    SELECT noteId
                    FROM notes
                      JOIN note_contents USING (noteId)
                    WHERE isDeleted = 0
                      AND isProtected = 0
                      AND content IS NULL
18:30:24.495 All consistency checks passed (took 95ms)
18:35:04.387 GET /api/similar-notes/eTXXkhsLjI6L took 3ms
18:35:04.596 Created backup at /home/name/Documents/Notes/trilium-data/backup/backup-daily.db
dyyd commented 3 years ago

Same issue here. Linux Mint 18.2. In /var/syslog I found this crash: kernel: [ 7437.662327] cinnamon[5991]: segfault at c0 ip 00007fc627b493e0 sp 00007ffd0177ed18 error 4 in libgio-2.0.so.0.4800.2[7fc627aab000+180000]

puffitos commented 3 years ago

I had this problem as well and I have an empirical solution to it. Maybe it's just happenstance, but whatever :)

I've noticed that I have no more crashes after deleting the trilium-notes.desktop file in ~/local/.share/applications/. No more crashes since then.

kalmigs commented 3 years ago

thanks @puffitos! been dealing with this for months. Now I don't get the crash, however trilium-notes.desktop is created everytime trilium is launched. What I did is add a command to remove the said file before running trilium.

mr-mosi commented 3 years ago

Thanks @puffitos i had same issue too, but your solution works for me. I guess every time installing a new version must delete trilium-notes.desktop for me located in ~/.local/share/applications/.

because when first time i delete the trilium-notes.desktop multiple time lunching app cased no crash. but not examined on restart.