manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <>
Subject [jira] [Commented] (CONNECTORS-1156) Can't shut down agents service when automatic ANALYZE TABLE, or any long-running query, is happening
Date Sat, 07 Feb 2015 09:17:34 GMT


Karl Wright commented on CONNECTORS-1156:

I determined, with some effort, that Adrian's issue was due in part to the database being
so badly in need of vacuuming that even basic query performance was poor.  Adrian has many
many jobs as well, all on schedules, and so multiple jobs wind up being in the "starting up"
state eventually under those conditions.  The problem in ManifoldCF here was that under certain
error conditions, it did not *immediately* throw an INTERRUPTED ManifoldCFException up the
stack, but instead attempted to process everything first before throwing the error.  That
would cause failure shutting down, because *all* queries would fail.

This could also be the problem Aeham was seeing, because the same startup thread would be
involved in initializing multiple jobs, which might also have a very extended initialization
period.  However, Aeham's description of the context was not sufficiently detailed for me
to be sure of this.

> Can't shut down agents service when automatic ANALYZE TABLE, or any long-running query,
is happening
> ----------------------------------------------------------------------------------------------------
>                 Key: CONNECTORS-1156
>                 URL:
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Framework agents process
>    Affects Versions: ManifoldCF 1.8, ManifoldCF 2.0
>            Reporter: Karl Wright
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 1.9, ManifoldCF 2.1
>         Attachments: sqlstate.patch
> This was detected on MCF 1.8.
> The thread blocking shutdown had the following trace:
> {code}
> "Startup thread" daemon prio=10 tid=0x00007fe73012f000 nid=0x340b in Object.wait() [0x00007fe71f7f6000]
>    java.lang.Thread.State: WAITING (on object monitor)
>     at java.lang.Object.wait(Native Method)
>     at java.lang.Thread.join(
>     - locked <0x00000000e851a0b8> (a org.apache.manifoldcf.core.database.Database$ExecuteQueryThread)
>     at java.lang.Thread.join(
>     at org.apache.manifoldcf.core.database.Database$ExecuteQueryThread.finishUp(
>     at org.apache.manifoldcf.core.database.Database.executeViaThread(
>     at org.apache.manifoldcf.core.database.Database.executeUncachedQuery(
>     at org.apache.manifoldcf.core.database.Database$QueryCacheExecutor.create(
>     at org.apache.manifoldcf.core.cachemanager.CacheManager.findObjectsAndExecute(
>     at org.apache.manifoldcf.core.database.Database.executeQuery(
>     at org.apache.manifoldcf.core.database.DBInterfacePostgreSQL.performModification(
>     at org.apache.manifoldcf.core.database.DBInterfacePostgreSQL.analyzeTableInternal(
>     at org.apache.manifoldcf.core.database.DBInterfacePostgreSQL.noteModificationsNoTransactions(
>     at org.apache.manifoldcf.core.database.Database.playbackModifications(
>     at org.apache.manifoldcf.core.database.Database.endTransaction(
>     at org.apache.manifoldcf.core.database.DBInterfacePostgreSQL.endTransaction(
>     at
>     at
> {code}
> This was after many minutes of waiting for the shutdown to take place, so clearly it's
looping in the sense that it keeps starting an ANALYZE, gets interrupted, and retries indefinitely.

This message was sent by Atlassian JIRA

View raw message