[ https://issues.apache.org/jira/browse/KAFKA-12308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17290793#comment-17290793 ]
Tom Bentley commented on KAFKA-12308: ------------------------------------- [~kkonstantine] I'm not an expert in classloaders but I'm still not sure that DCL shouldn't be considered parallel. The referred class loader guide explicitly says that an acyclic CL should delegate to {{super}} _first_. I understand that delegating to PCL first is intentional, but it doesn't fit with the definition given AFAICS. The fact that the CLs it delegates to are both parallel doesn't seem to be relevant. Also, the parent of the PCL is the DCL, which looks like a cycle to me (but, as I said, I'm no expert, so happy to be corrected). Assuming the {{synchronized}} was removed from PCL {{loadClass}}, then {noformat} "StartAndStopExecutor-connect-1-6": at org.apache.kafka.connect.runtime.isolation.PluginClassLoader.loadClass(PluginClassLoader.java:91) // lock PCLX (synchronized) {noformat} wouldn't get blocked, but there would still be two threads contenting two locks when racing to load the same class, those locks would be the {{getClassLoadingLock()}} on the PCL and the monitor of the DCL instance itself, so I think perhaps a deadlock would still be possible, just on different monitors. > ConfigDef.parseType deadlock > ---------------------------- > > Key: KAFKA-12308 > URL: https://issues.apache.org/jira/browse/KAFKA-12308 > Project: Kafka > Issue Type: Bug > Components: config, KafkaConnect > Affects Versions: 2.5.0 > Environment: kafka 2.5.0 > centos7 > java version "1.8.0_231" > Reporter: cosmozhu > Priority: Major > Attachments: deadlock.log > > > hi, > the problem was found, when I restarted *ConnectDistributed* > I restart ConnectDistributed in the single node for the test, with not delete > connectors. > sometimes the process stopped when creating connectors. > I add some logger and found it had a deadlock in `ConfigDef.parseType`.My > connectors always have the same transforms. I guess when connector startup > (in startAndStopExecutor which default 8 threads) and load the same class > file it has something wrong. > I attached the jstack log file. > thanks for any help. -- This message was sent by Atlassian Jira (v8.3.4#803005)