Matthias Pohl created FLINK-30621:
-------------------------------------
Summary: Violation of main thread constraint detected
Key: FLINK-30621
URL: https://issues.apache.org/jira/browse/FLINK-30621
Project: Flink
Issue Type: Bug
Components: Runtime / Coordination
Affects Versions: 1.17.0
Reporter: Matthias Pohl
When looking into FLINK-30540, I noticed the following warning being logged not
only in the context of {{DataSinkTaskTest}}:
{code}
00:56:09,055 [ pool-263-thread-1] WARN
org.apache.flink.runtime.rpc.MainThreadValidatorUtil [] - Violation of
main thread constraint detected: expected <Thread[main,5,main]> but running in
<Thread[pool-263-thread-1,5,main]>.
java.lang.Exception: Violation of main thread constraint detected: expected
<Thread[main,5,main]> but running in <Thread[pool-263-thread-1,5,main]>.
at
org.apache.flink.runtime.rpc.MainThreadValidatorUtil.isRunningInExpectedThread(MainThreadValidatorUtil.java:73)
~[flink-rpc-core-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
at
org.apache.flink.runtime.concurrent.ComponentMainThreadExecutorServiceAdapter.lambda$new$0(ComponentMainThreadExecutorServiceAdapter.java:56)
~[test-classes/:1.17-SNAPSHOT]
at
org.apache.flink.runtime.concurrent.ComponentMainThreadExecutorServiceAdapter.assertRunningInMainThread(ComponentMainThreadExecutorServiceAdapter.java:86)
~[test-classes/:1.17-SNAPSHOT]
at
org.apache.flink.runtime.jobmaster.slotpool.DeclarativeSlotPoolBridge.assertRunningInMainThread(DeclarativeSlotPoolBridge.java:446)
~[classes/:?]
at
org.apache.flink.runtime.jobmaster.slotpool.DeclarativeSlotPoolBridge.checkBatchSlotTimeout(DeclarativeSlotPoolBridge.java:464)
~[classes/:?]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[?:1.8.0_292]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[?:1.8.0_292]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
[?:1.8.0_292]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[?:1.8.0_292]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_292]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)