You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "peacewong (via GitHub)" <gi...@apache.org> on 2024/11/05 09:38:10 UTC

[I] [Bug] [Spark]The execution of SecureRandomStringUtils.random may get stuck. [linkis]

peacewong opened a new issue, #5196:
URL: https://github.com/apache/linkis/issues/5196

   ### Search before asking
   
   - [X] I searched the [issues](https://github.com/apache/linkis/issues) and found no similar issues.
   
   
   ### Linkis Component
   
   linkis-engineconnn-plugin
   
   ### Steps to reproduce
   
   1. execute pyspark task 
   2. java thread hang
   ```
   "TaskExecution-Thread-1" #144 daemon prio=5 os_prio=0 tid=0x00007f154800f000 nid=0x6fd8 runnable [0x00007f14efd6e000]
      java.lang.Thread.State: RUNNABLE
           at java.io.FileInputStream.readBytes(Native Method)
           at java.io.FileInputStream.read(FileInputStream.java:255)
           at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:424)
           at sun.security.provider.NativePRNG$RandomIO.ensureBufferValid(NativePRNG.java:525)
           at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:544)
           - locked <0x00000000c074f570> (a java.lang.Object)
           at sun.security.provider.NativePRNG$RandomIO.access$400(NativePRNG.java:331)
           at sun.security.provider.NativePRNG$Blocking.engineNextBytes(NativePRNG.java:268)
           at java.security.SecureRandom.nextBytes(SecureRandom.java:468)
           at java.security.SecureRandom.next(SecureRandom.java:491)
           at java.util.Random.nextInt(Random.java:390)
           at org.apache.linkis.engineplugin.spark.executor.SecureRandomStringUtils.random(SecureRandomStringUtils.java:182)
           at org.apache.linkis.engineplugin.spark.executor.SecureRandomStringUtils.random(SecureRandomStringUtils.java:99)
           at org.apache.linkis.engineplugin.spark.executor.SecureRandomStringUtils.random(SecureRandomStringUtils.java:76)
           at org.apache.linkis.engineplugin.spark.executor.SecureRandomStringUtils.randomAlphanumeric(SecureRandomStringUtils.java:60)
           at org.apache.linkis.engineplugin.spark.executor.SparkPythonExecutor.py4jToken$lzycompute(SparkPythonExecutor.scala:79)
   ```
   
   ### Expected behavior
   
   do not stuck.
   
   ### Your environment
   
   <!-- Please describe the linkis version you are using and basic environment information -->
   <!-- 请描述您使用的linkis版本和基本环境信息 -->
   - Linkis version used: 1.1.2
   - Environment name and version:
       - cdh-5.14.2
       - hdp-3.1.5
       - hive-2.1.1
       - spark-3.2.1
       - scala-2.12.2
       - jdk 1.8.0_121
       - ....
   
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


Re: [I] [Bug] [Spark]The execution of SecureRandomStringUtils.random may get stuck. [linkis]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #5196:
URL: https://github.com/apache/linkis/issues/5196#issuecomment-2456711756

   One potential change is allow users to opt out of the change in https://github.com/apache/linkis/pull/5143. I would prefer, if we use secure random strings by default but we could allow customers to choose to opt out.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


Re: [I] [Bug] [Spark]The execution of SecureRandomStringUtils.random may get stuck. [linkis]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5196:
URL: https://github.com/apache/linkis/issues/5196#issuecomment-2456685893

   ## :blush:  Welcome to the Apache Linkis community!!
   We are glad that you are contributing by opening this issue.
   
   Please make sure to include all the relevant context.
   We will be here shortly.
   
   If you are interested in contributing to our website project, please let us know!
   You can check out our contributing guide on
    :point_right:  [How to Participate in Project Contribution](https://linkis.apache.org/community/how-to-contribute).
   
   
   ### Community
   
   |WeChat Assistant|WeChat Public Account|
   |-|-|
   |<img src="https://linkis.apache.org/Images/wedatasphere_contact_01.png" width="128"/>|<img src="https://linkis.apache.org/Images/gzh_01.png" width="128"/>|
   
   
   ### Mailing Lists
   |Name|Description|Subscribe|Unsubscribe|Archive|
   |:-----|:--------|:------|:-------|:-----|
   | [dev@linkis.apache.org](mailto:dev@linkis.apache.org) | community activity information | [subscribe](mailto:dev-subscribe@linkis.apache.org) | [unsubscribe](mailto:dev-unsubscribe@linkis.apache.org) | [archive](http://mail-archives.apache.org/mod_mbox/linkis-dev) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


Re: [I] [Bug] [Spark]The execution of SecureRandomStringUtils.random may get stuck. [linkis]

Posted by "peacewong (via GitHub)" <gi...@apache.org>.
peacewong commented on issue #5196:
URL: https://github.com/apache/linkis/issues/5196#issuecomment-2458647439

   Yes, I think we should have the option to turn off use secure random by default, which is the mode that uses random numbers.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


Re: [I] [Bug] [Spark]The execution of SecureRandomStringUtils.random may get stuck. [linkis]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #5196:
URL: https://github.com/apache/linkis/issues/5196#issuecomment-2456702235

   @peacewong secure random requires entropy and on some VMs, there is not enough entropy
   
   Sometimes, you can work around this by adding `-Djava.security.egd=file:/dev/./urandom`
   
   When I have issues like this in the past, I have installed haveged on the affected machine.
   
   https://www.digitalocean.com/community/tutorials/how-to-setup-additional-entropy-for-cloud-servers-using-haveged
   
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


Re: [I] [Bug] [Spark]The execution of SecureRandomStringUtils.random may get stuck. [linkis]

Posted by "peacewong (via GitHub)" <gi...@apache.org>.
peacewong commented on issue #5196:
URL: https://github.com/apache/linkis/issues/5196#issuecomment-2456685981

   ping ~ @pjfanning 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


Re: [I] [Bug] [Spark]The execution of SecureRandomStringUtils.random may get stuck. [linkis]

Posted by "casionone (via GitHub)" <gi...@apache.org>.
casionone closed issue #5196: [Bug] [Spark]The execution of SecureRandomStringUtils.random may get stuck.
URL: https://github.com/apache/linkis/issues/5196


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org