经过几天的工作,我在应用程序中遇到了阻塞 java.security.Provider.getService(String, String) 的问题。这是 subethasmtp 的堆栈跟踪,但在所有其他线程(IMAP、HTTPS 等)上都是一样的。
Java Monitor Blocked
at java.security.Provider.getService(String, String)
at sun.security.jca.ProviderList$ServiceList.tryGet(int)
at sun.security.jca.ProviderList$ServiceList.access$200(ProviderList$ServiceList, int)
at sun.security.jca.ProviderList$ServiceList$1.hasNext()
at javax.crypto.KeyGenerator.nextSpi(KeyGeneratorSpi, boolean)
at javax.crypto.KeyGenerator.<init>(String)
at javax.crypto.KeyGenerator.getInstance(String)
at sun.security.ssl.JsseJce.getKeyGenerator(String)
at sun.security.ssl.HandshakeMessage$Finished.getFinished(HandshakeHash, int, SecretKey)
at sun.security.ssl.HandshakeMessage$Finished.<init>(ProtocolVersion, HandshakeHash, int, SecretKey, CipherSuite)
at sun.security.ssl.ServerHandshaker.sendChangeCipherAndFinish(boolean)
at sun.security.ssl.ServerHandshaker.clientHello(HandshakeMessage$ClientHello)
at sun.security.ssl.ServerHandshaker.processMessage(byte, int)
at sun.security.ssl.Handshaker.processLoop()
at sun.security.ssl.Handshaker.process_record(InputRecord, boolean)
at sun.security.ssl.SSLSocketImpl.readRecord(InputRecord, boolean)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake()
at sun.security.ssl.SSLSocketImpl.startHandshake(boolean)
at sun.security.ssl.SSLSocketImpl.startHandshake()
at org.subethamail.smtp.command.StartTLSCommand.execute(String, Session)
at org.subethamail.smtp.server.CommandHandler.handleCommand(Session, String)
at org.subethamail.smtp.server.Session.runCommandLoop()
at org.subethamail.smtp.server.Session.run()
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
at java.util.concurrent.ThreadPoolExecutor$Worker.run()
at java.lang.Thread.run()