Hi Do you own locking if you do concurrent model changes to Camel
On Thu, Sep 1, 2022 at 6:21 PM Gerda Ilger <gerda.il...@ecosio.com> wrote: > Dear Camel Community, > > We ran into a deadlock when concurrently adding and removing routes. > > We're dynamically adding and removing routes, whose (ftp) consumers > sometimes take a longer time to start up, and observed the following: > > * (Default/Abstract)CamelContext.addRoutes -> > DefaultCamelContext.addRouteDefinitions locks DefaultModel first, and > is then blocked trying to lock DefaultCamelContext > * (Default/Abstract)CamelContext.removeRoute locks DefaultCamelContext > first, and is then blocked trying to lock DefaultModel > > --- > > Found one Java-level deadlock: > ============================= > > "pool-2-thread-3": > waiting to lock monitor 0x00007fd21404a130 (object 0x000000068c002a20, > a org.apache.camel.impl.DefaultCamelContext), > which is held by "pool-2-thread-2" > > "pool-2-thread-2": > waiting to lock monitor 0x00007fd22000b0c0 (object 0x000000068c800170, > a org.apache.camel.impl.DefaultModel), > which is held by "pool-2-thread-3" > > --- > > > We are on Camel 3.7, but I was able to reproduce it with > 3.19.0-SNAPSHOT in a JUnit test. > > I haven't found any tickets or mailing list discussions about this > behaviour. > Is this a known issue? > > > Thanks, > Gerda > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2