Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message schemaVersion Index Migration Causes Out-Of-Memory Error #2163

Closed
1 task done
rubin110 opened this issue Mar 22, 2018 · 13 comments
Closed
1 task done

Message schemaVersion Index Migration Causes Out-Of-Memory Error #2163

rubin110 opened this issue Mar 22, 2018 · 13 comments
Labels

Comments

@rubin110
Copy link

rubin110 commented Mar 22, 2018

  • I have searched open and closed issues for duplicates

Bug description

After installing 1.7.0-beta.2, Signal shows loading triple throbber for a few minutes before process dies. While it attempts to load Signal eats up a substantial part of CPU.

Steps to reproduce

  1. Install 1.7.0-beta.2
  2. Attempt to open Signal
  3. Observe

Actual result:

After some minimal loading time Signal opens to the conversation list screen.

Expected result:

After about 9 minutes of loading, Signal closes and disappears. No process is left over.

Screenshots

20180322011701-selection

Platform info

Signal version:

1.7.0-beta.2

Operating System:

Debian Sid, Linux 4.15.0-1-amd64

Linked device version:

4.16.9

Link to debug log

Here's the tail end of a signal-desktop-beta -vvvvv:

{"name":"log","hostname":"lines","pid":8250,"level":30,"msg":"Create index from attachment schema version to attachment","time":"2018-03-22T08:14:32.713Z","v":0}
{"name":"log","hostname":"lines","pid":8250,"level":30,"msg":"Complete migration to database version 17. Duration: 374092ms","time":"2018-03-22T08:14:32.732Z","v":0}
tcmalloc: large alloc 1782579200 bytes == 0x382d98f29000 @ 
[8250:0322/011712.692652:FATAL:memory_linux.cc(35)] Out of memory.
#0 0x00000378afa7 <unknown>
#1 0x0000037cb27b <unknown>
#2 0x00000379e37e <unknown>
#3 0x000003794774 operator new()
#4 0x7f693e6e72ad std::string::_Rep::_S_create()
#5 0x7f693e6e81df std::string::_Rep::_M_clone()
#6 0x7f693e6e8288 std::string::reserve()
#7 0x7f693e6e852e std::string::append()
#8 0x00000156049f <unknown>
#9 0x000000d38913 <unknown>
#10 0x000000b0f3ce <unknown>
#11 0x000000c3aaaa <unknown>
#12 0x0000009a20dc <unknown>
#13 0x0000009a1eb8 <unknown>
#14 0x0000009a3b5f <unknown>
#15 0x000000c39d08 <unknown>
#16 0x0000009a2831 <unknown>
#17 0x000000d9461a <unknown>
#18 0x000001402d88 <unknown>
#19 0x0000037a2370 <unknown>
#20 0x00000376facd <unknown>
#21 0x00000376fde8 <unknown>
#22 0x000003770486 <unknown>
#23 0x00000377ed5a <unknown>
#24 0x00000376f7f7 <unknown>
#25 0x000003777dde <unknown>
#26 0x00000377bd47 <unknown>
#27 0x00000377a383 <unknown>
#28 0x7f69448e25aa start_thread
#29 0x7f693dda6cbf clone
@rubin110
Copy link
Author

This was working fine earlier in the day with whatever version I was using before I dist-upgraded around noon.

@rubin110
Copy link
Author

Also, to be a little clearer, Signal is now unusable for me on desktop as it crashes after about 9 minutes every time I load it up.

@scottnonnenberg-signal
Copy link
Contributor

scottnonnenberg-signal commented Mar 23, 2018

Hi there, @rubin110. Thank you very much for being a Beta tester. You have saved many others the pain of going through what you're going through right now. To unblock daily usage, you might consider installing the production version, linking that up to your phone (the limit is five linked devices), and using it in the near term.

Several questions:

  • How big is your ~/.config/Signal Beta directory?
  • Can you give us the couple log lines right before that? We'd love to know how many messages were modified as part of that migration.
  • How much memory does it end up using before it dies?

@scottnonnenberg-signal
Copy link
Contributor

Another Q: How big is your ~/.config/Signal Beta/IndexedDB folder specifically?

@scottnonnenberg-signal
Copy link
Contributor

Another couple questions: can you tell us about your computer's specs? How much RAM? Processor speed?

@mmirg
Copy link

mmirg commented Mar 23, 2018

I see this same issue on startup with 1.7.0-beta2.

~/.config/Signal Beta/IndexedDB is 4.2 GB

CPU: Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz
Memory: 16 GB

tcmalloc: large alloc 1269825536 bytes == 0x27b5e0a25000 @ 
[3820:0324/071944.348811:FATAL:memory_linux.cc(35)] Out of memory.
#0 0x00000378afa7 <unknown>
#1 0x0000037cb27b <unknown>
#2 0x00000379e37e <unknown>
#3 0x000003794774 operator new()
#4 0x7f9b35495fd9 std::string::_Rep::_S_create()
#5 0x7f9b35496dbb std::string::_Rep::_M_clone()
#6 0x7f9b35496e64 std::string::reserve()
#7 0x7f9b354970f3 std::string::append()
#8 0x00000156049f <unknown>
#9 0x000000d38913 <unknown>
#10 0x000000b0f3ce <unknown>
#11 0x000000c3aaaa <unknown>
#12 0x0000009a20dc <unknown>
#13 0x0000009a1eb8 <unknown>
#14 0x0000009a3b5f <unknown>
#15 0x000000c39d08 <unknown>
#16 0x0000009a2831 <unknown>
#17 0x000000d9461a <unknown>
#18 0x000001402d88 <unknown>
#19 0x0000037a2370 <unknown>
#20 0x00000376facd <unknown>
#21 0x00000376fde8 <unknown>
#22 0x000003770486 <unknown>
#23 0x00000377ed5a <unknown>
#24 0x00000376f7f7 <unknown>
#25 0x000003777dde <unknown>
#26 0x00000377bd47 <unknown>
#27 0x00000377a383 <unknown>
#28 0x7f9b3b5ec404 start_thread
#29 0x7f9b34bfca8d clone

Aborted

@rubin110
Copy link
Author

rubin110 commented Mar 23, 2018

$ du -hd1 ~/.config/Signal\ Beta/
44K     /home/rubin110/.config/Signal Beta/GPUCache
4.0K    /home/rubin110/.config/Signal Beta/Local Storage
4.5M    /home/rubin110/.config/Signal Beta/logs
4.0K    /home/rubin110/.config/Signal Beta/blob_storage
5.6G    /home/rubin110/.config/Signal Beta/IndexedDB
12K     /home/rubin110/.config/Signal Beta/databases
5.6G    /home/rubin110/.config/Signal Beta/

It eats up about 6 gigs of real memory and 10 gigs of virtual memory before something chokes and it dies. Here's a screenshot of htop about 1 minute before it died...

20180323160324-selection

My machine is a ThinkPad X1 4th Gen, Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz, with 16gb of ram running Debian Sid with KDE Plasma 5.12.3.

{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1244\",\"contentType\":\"image/png\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":24,\"markedOffset\":-1,\"limit\":88,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:53.711Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1245\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":34,\"markedOffset\":-1,\"limit\":98,\"littleEndian\":true,\"noAssert\":false},\"size\":50753,\"thumbnail\":null,\"digest\":{\"buffer\":{},\"view\":{},\"offset\":104,\"markedOffset\":-1,\"limit\":136,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:53.786Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1246\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":54,\"markedOffset\":-1,\"limit\":118,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:53.825Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1247\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":54,\"markedOffset\":-1,\"limit\":118,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:54.450Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1248\",\"contentType\":\"image/png\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":51,\"markedOffset\":-1,\"limit\":115,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:54.830Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1249\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":51,\"markedOffset\":-1,\"limit\":115,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:54.945Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1250\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":38,\"markedOffset\":-1,\"limit\":102,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:55.032Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1251\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":38,\"markedOffset\":-1,\"limit\":102,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:55.084Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1252\",\"contentType\":\"image/png\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":37,\"markedOffset\":-1,\"limit\":101,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:55.297Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1253\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":52,\"markedOffset\":-1,\"limit\":116,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:55.530Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1254\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":25,\"markedOffset\":-1,\"limit\":89,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:56.014Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"contentType\":\"image/jpeg\",\"id\":\"attachment1255\",\"data\":{}}","time":"2018-03-23T23:01:56.512Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1256\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":25,\"markedOffset\":-1,\"limit\":89,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:56.639Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1257\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":25,\"markedOffset\":-1,\"limit\":89,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:56.665Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1258\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":27,\"markedOffset\":-1,\"limit\":91,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:57.047Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"contentType\":\"image/png\",\"id\":\"attachment1259\",\"data\":{}}","time":"2018-03-23T23:01:57.562Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1260\",\"contentType\":\"image/png\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":61,\"markedOffset\":-1,\"limit\":125,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:57.634Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"contentType\":\"image/jpeg\",\"id\":\"attachment1261\",\"data\":{}}","time":"2018-03-23T23:01:57.786Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1262\",\"contentType\":\"image/gif\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":24,\"markedOffset\":-1,\"limit\":88,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:58.623Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1263\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":27,\"markedOffset\":-1,\"limit\":91,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:58.909Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1264\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":52,\"markedOffset\":-1,\"limit\":116,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:59.607Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1265\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":54,\"markedOffset\":-1,\"limit\":118,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:59.834Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1266\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":27,\"markedOffset\":-1,\"limit\":91,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:59.927Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1267\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":52,\"markedOffset\":-1,\"limit\":116,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:01:59.960Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1268\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":53,\"markedOffset\":-1,\"limit\":117,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:00.293Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1269\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":53,\"markedOffset\":-1,\"limit\":117,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:00.347Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1270\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":52,\"markedOffset\":-1,\"limit\":116,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:00.769Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1271\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":44,\"markedOffset\":-1,\"limit\":108,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:01.746Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1272\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":54,\"markedOffset\":-1,\"limit\":118,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:01.932Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1273\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":108,\"markedOffset\":-1,\"limit\":172,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:01.946Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1274\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":27,\"markedOffset\":-1,\"limit\":91,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:02.295Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1275\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":53,\"markedOffset\":-1,\"limit\":117,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:02.414Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1276\",\"contentType\":\"image/png\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":53,\"markedOffset\":-1,\"limit\":117,\"littleEndian\":true,\"noAssert\":false},\"size\":116521,\"thumbnail\":null,\"digest\":{\"buffer\":{},\"view\":{},\"offset\":123,\"markedOffset\":-1,\"limit\":155,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:02.433Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1277\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":30,\"markedOffset\":-1,\"limit\":94,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:02.483Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1278\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":27,\"markedOffset\":-1,\"limit\":91,\"littleEndian\":true,\"noAssert\":false},\"size\":null,\"thumbnail\":null,\"digest\":{\"buffer\":{},\"view\":{},\"offset\":93,\"markedOffset\":-1,\"limit\":125,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:02.831Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1279\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":27,\"markedOffset\":-1,\"limit\":91,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:03.085Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1280\",\"contentType\":\"image/jpeg\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":27,\"markedOffset\":-1,\"limit\":91,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:04.273Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Attachment.removeSchemaVersion: Invalid input attachment: {\"id\":\"attachment1281\",\"contentType\":\"image/png\",\"key\":{\"buffer\":{},\"view\":{},\"offset\":51,\"markedOffset\":-1,\"limit\":115,\"littleEndian\":true,\"noAssert\":false},\"data\":{}}","time":"2018-03-23T23:02:04.279Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Complete messages schema version initialization {\"numUpgradedMessages\":105721}","time":"2018-03-23T23:02:04.709Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Create index from attachment schema version to attachment","time":"2018-03-23T23:02:04.710Z","v":0}
{"name":"log","hostname":"lines","pid":7072,"level":30,"msg":"Complete migration to database version 17. Duration: 395797ms","time":"2018-03-23T23:02:04.722Z","v":0}
tcmalloc: large alloc 1782579200 bytes == 0x30786a6dc000 @ 
[7072:0323/160432.040878:FATAL:memory_linux.cc(35)] Out of memory.
#0 0x00000378afa7 <unknown>
#1 0x0000037cb27b <unknown>
#2 0x00000379e37e <unknown>
#3 0x000003794774 operator new()
#4 0x7f9b2e5f52ad std::string::_Rep::_S_create()
#5 0x7f9b2e5f61df std::string::_Rep::_M_clone()
#6 0x7f9b2e5f6288 std::string::reserve()
#7 0x7f9b2e5f652e std::string::append()
#8 0x00000156049f <unknown>
#9 0x000000d38913 <unknown>
#10 0x000000b0f3ce <unknown>
#11 0x000000c3aaaa <unknown>
#12 0x0000009a20dc <unknown>
#13 0x0000009a1eb8 <unknown>
#14 0x0000009a3b5f <unknown>
#15 0x000000c39d08 <unknown>
#16 0x0000009a2831 <unknown>
#17 0x000000d9461a <unknown>
#18 0x000001402d88 <unknown>
#19 0x0000037a2370 <unknown>
#20 0x00000376facd <unknown>
#21 0x00000376fde8 <unknown>
#22 0x000003770486 <unknown>
#23 0x00000377ed5a <unknown>
#24 0x00000376f7f7 <unknown>
#25 0x000003777dde <unknown>
#26 0x00000377bd47 <unknown>
#27 0x00000377a383 <unknown>
#28 0x7f9b347f05aa start_thread
#29 0x7f9b2dcb4cbf clone

For what it's worth tee doesn't capture the fatal memory crash, this is just through my terminal. I don't see anything else other than these Attachment.removeSchemaVersion: Invalid input attachment messages running.

@rubin110
Copy link
Author

I'm wondering if my issues around #2070 are related. Previously when I could load up Signal I would get the sense that some part of the UI for that conversation would lock up when I clicked on it, mostly happening with conversations that had a long long (multi year at this point) backlog. Occasionally some of those conversations would (after tens of seconds to a minute or two of churning) would get unstuck and display the messaging log with text field, but with no backlog. I'm thinking now what must have been happening was something part of a db getting loaded into memory (or paging taking too long) and the client finally giving up.

@scottnonnenberg-signal
Copy link
Contributor

@rubin110 One thing is for sure - you win the prize for the biggest data folder we've ever seen! And it is almost certainly causing problems across all the app as the app struggles with the size of all the data.

We are working on it as we speak.

@rubin110
Copy link
Author

Thanks for the prize, I'm honored! I blame the combination of being really good about backing up/persisting my data over the years, and the Bitmoji only group conversation I created last year. I'd like to thank my mom for having no idea how computers work, and @liliakai for insisting that Signal works perfectly fine for our group chat at Congress so many years ago.

@scottnonnenberg-signal: I don't know if you're in the SF office, but if it would help having my laptop within glaring distance to debug this I'm happy to drop around late lunch today.

bitmoji

@gasi-signal gasi-signal changed the title After installing 1.7.0-beta.2, Signal shows loading triple throbber for a few minutes before process dies because it's eaten all the memory Message schemaVersion Index Migration Causes Out-Of-Memory Error Mar 30, 2018
@rubin110
Copy link
Author

rubin110 commented Apr 5, 2018

With Signal beta 1.7.0-beta.3 on Debian Sid, after about 5-10 minutes of churning by being stuck on the initial loading screen, the app loads fine and I can see my list of contacts and click into conversations with no problem or any sort of terrible delay. The process while loading didn't ever go over about 300mb of real memory or about 2.5gb of virtual. Currently idling at 225mb real, 1.86gb virtual.

Quitting and loading the app for a second time, it only took about 30 seconds to open up and get to my list of conversations.

Do note I did just upgrade to a ThinkPad T480s with 24GB of ram, but it looks like whatever change has happened with 1.7.0-beta.3, it hardly used any of that available memory.

@mmirg: Do you also see this fix? If you do then I would consider this issue squashed.

bitmoji

@gasi-signal
Copy link
Contributor

gasi-signal commented Apr 5, 2018

@rubin110 I meant to reach out proactively but alas. Glad your initial experience with the new beta build was positive! Our focus was to unblock people like you and incrementally improve performance and stability for everyone. We went back and forth between doing an upfront database optimization or do it in the background. Since it an upfront migration could have taken on the order of minutes, we opted for the background mechanism. This means the app should get faster and better over time. For the best experience, please leave the app open, even if not used.

We appreciate your initial report as it helped us refine our approach and would appreciate any feedback regarding performance / stability (time to open conversation, memory usage, etc.) going forward, whether good or bad!

@gasi-signal
Copy link
Contributor

@rubin110 I will close this issue as we believe the out-of-memory error on startup should have been resolved with the 1.7.0-beta.3 release. As I previously said, please continue sharing any valuable experiences / metrics going forward in this thread 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants