Hello!

I got the strange error first reported as "External module not found", but after putting a few diagnostic transcript outputs to the code:

TowergameSyncTests >> setUp
        Transcript cr; show: self; cr; show: 'ENTER setUp'; cr.
        dao := Towergame daoForLogin: self loginToTemporaryDatabase.
        session := dao glorpSession.
        Transcript cr; show: 'LEAVE setUp'; cr.

TowergameSyncTests >> tearDown
        Transcript cr; show: 'ENTER tearDown'; cr.
        session logout.
        Transcript cr; show: 'LEAVE tearDown'; cr.

I got this in an (excerpt of an) output in my Go CD agent. It runs on 32bit Ubuntu 16.04.3, uses 61+vm:

13:10:58.277 [go] Start to execute task: Plugin with ID: script-executor.
13:10:58.295 [script-executor] OS detected: 'Linux'. Is Windows? false
13:10:58.313 [script-executor] Script written into '/var/lib/go-agent/pipelines/filmtower-srv/cffa4492-a817-41e0-bb64-72a9e5a3d890.sh'.
13:10:58.325 + cd code
13:10:58.325 + ../pharo/pharo ./filmtower.image conf/run-tests.st
13:10:58.866
13:10:58.867 TowergameServerTests
13:10:58.961 4 run, 4 passes, 0 skipped, 0 expected failures, 0 failures, 0 errors, 0 unexpected passes
13:10:58.962
13:10:58.962 TowergameSyncTests
13:10:58.962
13:10:58.962 TowergameSyncTests>>#testPlayerCanHaveDisabledDeviceSaved
13:10:58.962 ENTER setUp
13:10:58.991
13:10:58.991 ENTER tearDown
13:10:58.994
13:10:58.995 TowergameSyncTests>>#testPlayerChecksStateVersion
13:10:58.995 ENTER setUp
13:10:59.000
13:10:59.000 ENTER tearDown
13:10:59.001
13:10:59.002 TowergameSyncTests>>#testPlayerChecksStateVersionAndHasFreshlyInstalled
13:10:59.002 ENTER setUp
13:10:59.014
13:10:59.015 ENTER tearDown
13:10:59.015
13:10:59.021 TowergameSyncTests>>#testPlayerChecksStateVersionAndIsBehind
13:10:59.021 ENTER setUp
13:10:59.031 Error: External module not found
13:10:59.031 ExternalLibraryFunction(Object)>>error:
13:10:59.033 ExternalLibraryFunction(Object)>>externalCallFailed
13:10:59.034 ExternalLibraryFunction(ExternalFunction)>>invokeWithArguments:
13:10:59.034 UDBCSQLite3DatabaseExternalObject class>>finalizeResourceData:
13:10:59.035 FFICalloutAPI>>function:module:
13:10:59.035 UDBCSQLite3Library(Object)>>ffiCall:module:
13:10:59.036 UDBCSQLite3DatabaseExternalObject class>>finalizeResourceData:
13:10:59.036 FFIExternalResourceExecutor>>finalize
13:10:59.036 WeakFinalizerItem>>finalizeValues
13:10:59.059 [ each finalizeValues ] in [ :each | [ each finalizeValues ] on: Exception fork: [ :ex | ex pass ] ] in WeakRegistry>>finalizeValues in Block: [ each finalizeValues ]
13:10:59.059 BlockClosure>>on:do:
13:10:59.079 [ Processor terminateActive ] in [ :ex |
13:10:59.079 | copy onDoCtx process handler bottom thisCtx |
13:10:59.079 onDoCtx := thisContext.
13:10:59.079 thisCtx := onDoCtx home.
13:10:59.079
13:10:59.079 "find the context on stack for which this method's is sender"
13:10:59.079 [ onDoCtx sender == thisCtx ]
13:10:59.079    whileFalse: [ onDoCtx := onDoCtx sender.
13:10:59.079            onDoCtx
13:10:59.079 ifNil: [ "Can't find our home context. seems like we're already forked 13:10:59.079 and handling another exception in new thread. In this case, just pass it through handler." ^ handlerAction cull: ex ] ].
13:10:59.079 bottom := [ Processor terminateActive ] asContext.
13:10:59.079 onDoCtx privSender: bottom.
13:10:59.079 handler := [ handlerAction cull: ex ] asContext.
13:10:59.080 handler privSender: thisContext sender.
13:10:59.081 (Process forContext: handler priority: Processor activePriority)
13:10:59.081    resume.
13:10:59.081
13:10:59.081 "cut the stack of current process"
13:10:59.081 thisContext privSender: thisCtx.
13:10:59.082 nil ] in BlockClosure>>on:fork: in Block: [ Processor terminateActive ]
13:10:59.226
13:10:59.228 [script-executor] Script completed with exit code: 1.
13:10:59.285 [go] Current job status: failed.

There are two dimensions to this:

1. It is not "External module not found" as far as I can say, as a few tests passed, going through both setUp and tearDown. Something is wrong when finalizers kick in. FWIW, the login I use to log in the test db, created anew each time, because it is SQLite temp db, is:

TowergameSyncTests >> loginToTemporaryDatabase
        ^ Login new
                database: UDBCSQLite3Platform new;
                host: '';
                port: '';
                username: '';
                password: '';
                databaseName: '';
                yourself

If I understood correctly, it creates db backed by temp file which gets removed once connection closes.

Everything works fine in my dev machine (Win 10, non-headless), where tests just pass fine.

2. Where are "LEAVE setUp" and "LEAVE tearDown" messages? They are missing from the transcipt (again, on dev machine, in non-headless mode, they show up in the Transcript window).


Can someone hint at what is wrong / udbcsqlite authors look at if there isn't something incorrect in the sqlite driver / library?

I don't know what to do in this state. It seems it should just work.

(I can upload the image somewhere if you're interested).

Thanks, Herby


P.S.: I tried on 64-bit linux (Ubuntu 14.04) with get.pharo.org/64/61+vm, and ran things that Go CD job does by hand. The output is the same (few tests run, then finalizers crash the image).

P.P.S.: When tried again and again trying just the last line (... run-tests.st), it consistently crashes the same way.

Reply via email to