sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

jupyter2/local-hub crash #2595

Closed haraldschilly closed 3 months ago

haraldschilly commented 6 years ago

My test project started to behave strangely, and that's what the project pod's log shows.

2017-12-20T11:20:10.197Z - debug: open_syncstrings: 7; recent_syncstrings: 7                                                                                                                                                                                                                                         [21/3964]
2017-12-20T11:20:10.198Z - debug: Client.handle_mesg({"action":"update","new_val":{"deleted":false,"users":["3c40513b-7e7c-450c-aa13-bf4f3411cf33","20e4a191-73ea-4921-80e9-0a5d792fc511"],"save":{"hash":1090349563,"error":false,"state":"done"},"last_active":"2017-12-20T11:19:26.706Z","init":{"size":0,"time":"2017-12-2
0T11:20:09.978Z","error":""},"read_only":false,"doctype":"{\"type\":\"string\"}","string_id":"3cea52cb6d073dfc0d58f8cbb6ff6c8fe3a960bc","project_id":"20e4a191-73ea-4921-80e9-0a5d792fc511","path":"course3-collect/assignment-plot/c4bffe…): calling callback
2017-12-20T11:20:10.199Z - debug: Client.handle_mesg({"action":"update","new_val":{"deleted":false,"users":["3c40513b-7e7c-450c-aa13-bf4f3411cf33","20e4a191-73ea-4921-80e9-0a5d792fc511"],"save":{"hash":1279959932,"error":false,"state":"requested"},"last_active":"2017-12-20T11:20:02.748Z","init":{"size":0,"time":"2017
-12-20T11:20:09.978Z","error":""},"read_only":false,"doctype":"{\"type\":\"db\",\"patch_format\":1,\"opts\":{\"primary_keys\":[\"type\",\"id\"],\"string_cols\":[\"input\"]}}","string_id":"bfa404271d402e4e4080e3bef787b8c09d9248c1","pro…): calling callback
2017-12-20T11:20:10.199Z - debug: Client.handle_mesg({"id":"de50960a-b54a-4f51-8f4b-1fda4849c0c6","query":{},"multi_response":false,"event":"query"}): calling callback
2017-12-20T11:20:10.200Z - debug: Client.jupyter_backend: syncdb init complete -- undefined                                                                          
2017-12-20T11:20:10.200Z - debug: Client.JupyterActions('course3-collect/assignment-plot/c4bffe8b-51c5-407c-be8c-9c00cc2edbd0/plot2.ipynb').initialize_manager: cells at manage_init = undefined
2017-12-20T11:20:10.201Z - debug: BUG ****************************************************************************                                                                                                
2017-12-20T11:20:10.201Z - debug: Uncaught exception: TypeError: this.syncdb.delete is not a function                                                                                           
2017-12-20T11:20:10.204Z - debug: TypeError: this.syncdb.delete is not a function                                                                                          
    at JupyterActions.exports.JupyterActions.JupyterActions.initialize_manager (/cocalc/src/smc-webapp/jupyter/project-actions.js:127:28)                                          
    at JupyterActions.initialize_manager (/cocalc/src/smc-webapp/jupyter/project-actions.js:14:59)                                                                                 
    at JupyterActions.exports.JupyterActions.JupyterActions.__syncdb_change (/cocalc/src/smc-webapp/jupyter/actions.js:994:16)                                                                                      
    at JupyterActions.__syncdb_change (/cocalc/src/smc-webapp/jupyter/actions.js:15:59)           
    at JupyterActions.exports.JupyterActions.JupyterActions._syncdb_change (/cocalc/src/smc-webapp/jupyter/actions.js:914:12)                                                          
    at SyncString.<anonymous> (/cocalc/src/smc-webapp/jupyter/actions.js:15:59)                                                                                                         
    at emitNone (events.js:91:20)                                                                                                                                                                                  
    at SyncString.emit (events.js:185:7)                                       
    at /cocalc/src/smc-util/syncstring.js:1217:21                                                
    at /cocalc/src/smc-util/node_modules/async/lib/async.js:726:13                                                
    at /cocalc/src/smc-util/node_modules/async/lib/async.js:52:16                                                                                                    
    at /cocalc/src/smc-util/node_modules/async/lib/async.js:269:32     
    at /cocalc/src/smc-util/node_modules/async/lib/async.js:44:16
    at Object.<anonymous> (/cocalc/src/smc-util/node_modules/async/lib/async.js:723:17)
    at Object.cb (/cocalc/src/smc-util/node_modules/async/lib/async.js:167:37)
    at /cocalc/src/smc-project/client.js:566:59                                        
    at Client.exports.Client.Client.handle_mesg (/cocalc/src/smc-project/client.js:486:9)
    at Client.handle_mesg (/cocalc/src/smc-project/client.js:24:59)                                                                      
    at handle_mesg (/cocalc/src/smc-project/local_hub.js:216:20)                                  
    at Socket.handler (/cocalc/src/smc-project/local_hub.js:319:22)                                                           
    at emitTwo (events.js:106:13)                                                      
    at Socket.emit (events.js:191:7)                                                                                         
    at Socket.socket._listen_for_mesg (/cocalc/src/smc-util-node/misc_node.js:97:22)
    at emitOne (events.js:96:13)    
    at Socket.emit (events.js:188:7)    
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)          
    at TCP.onread (net.js:547:20)                                

2017-12-20T11:20:10.205Z - debug: BUG ****************************************************************************
Trace                                                                                  
    at process.<anonymous> (/cocalc/src/smc-project/local_hub.js:31:15)       
    at emitOne (events.js:101:20)              
    at process.emit (events.js:188:7)                                                    
    at process._fatalException (bootstrap_node.js:296:26)          

TypeError: this.syncdb.delete is not a function                    
    at JupyterActions.exports.JupyterActions.JupyterActions.initialize_manager (/cocalc/src/smc-webapp/jupyter/project-actions.js:127:28)
    at JupyterActions.initialize_manager (/cocalc/src/smc-webapp/jupyter/project-actions.js:14:59)
    at JupyterActions.exports.JupyterActions.JupyterActions.__syncdb_change (/cocalc/src/smc-webapp/jupyter/actions.js:994:16)
    at JupyterActions.__syncdb_change (/cocalc/src/smc-webapp/jupyter/actions.js:15:59)
    at JupyterActions.exports.JupyterActions.JupyterActions._syncdb_change (/cocalc/src/smc-webapp/jupyter/actions.js:914:12)
    at SyncString.<anonymous> (/cocalc/src/smc-webapp/jupyter/actions.js:15:59)
    at emitNone (events.js:91:20)
    at SyncString.emit (events.js:185:7)
    at /cocalc/src/smc-util/syncstring.js:1217:21
    at /cocalc/src/smc-util/node_modules/async/lib/async.js:726:13
    at /cocalc/src/smc-util/node_modules/async/lib/async.js:52:16
    at /cocalc/src/smc-util/node_modules/async/lib/async.js:269:32
    at /cocalc/src/smc-util/node_modules/async/lib/async.js:44:16
    at Object.<anonymous> (/cocalc/src/smc-util/node_modules/async/lib/async.js:723:17)
    at Object.cb (/cocalc/src/smc-util/node_modules/async/lib/async.js:167:37)
    at /cocalc/src/smc-project/client.js:566:59
    at Client.exports.Client.Client.handle_mesg (/cocalc/src/smc-project/client.js:486:9)
    at Client.handle_mesg (/cocalc/src/smc-project/client.js:24:59)
    at handle_mesg (/cocalc/src/smc-project/local_hub.js:216:20)
    at Socket.handler (/cocalc/src/smc-project/local_hub.js:319:22)
    at emitTwo (events.js:106:13)
    at Socket.emit (events.js:191:7)
    at Socket.socket._listen_for_mesg (/cocalc/src/smc-util-node/misc_node.js:97:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:547:20)

2017-12-20T11:20:10.206Z - debug: Client.jupyter.Kernel('python3',path='save-plots.ipynb').close:
2017-12-20T11:20:10.207Z - debug: Client.JupyterActions('save-plots.ipynb')._backend_syncdb_change: settings change
2017-12-20T11:20:10.207Z - debug: Client.JupyterActions('save-plots.ipynb').ensure_backend_kernel_setup: kernel='python3', current='undefined'
2017-12-20T11:20:10.207Z - debug: Client.JupyterActions('save-plots.ipynb').ensure_backend_kernel_setup: no kernel; make one
2017-12-20T11:20:10.212Z - debug: Client.jupyter.Kernel('python3',path='save-plots.ipynb').constructor:
2017-12-20T11:20:10.213Z - debug: Client.JupyterActions('save-plots.ipynb').handle_cell_attachments(id=e8bd38):
2017-12-20T11:20:10.213Z - debug: Client.JupyterActions('save-plots.ipynb').handle_cell_attachments(id=120b9d):
williamstein commented 6 years ago

I couldn't reproduce this anywhere except in the one place where it originally happened, and then it went away on doing a clean restart of the project. Hmm. Logically the bug itself makes absolutely no sense to me, at least in the current version of the code.

Close this if we don't see it again in a bit.