Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Potential threading issue causing RPC crash #361

Open
stephenpdeos opened this issue Feb 12, 2025 · 0 comments · May be fixed by #363
Open

Potential threading issue causing RPC crash #361

stephenpdeos opened this issue Feb 12, 2025 · 0 comments · May be fixed by #363
Assignees
Labels
bug Something isn't working 👍 lgtm

Comments

@stephenpdeos
Copy link
Member

stephenpdeos commented Feb 12, 2025

related to #247

version used:
eos-evm-node: f1d34c1
evm contract: 4b3ea85eac4a41d3c7d3195b1d19ab73027adc12

If commented out the discount factor logic (always set scaled_gas_params = gas_params; to avoid assertion factor_den > 0 fails in bug 1), the rpc process crashes: signal SIGSEGV, if commented out the discount factor logic.

kayan-u20@kayan-u20:~/workspaces/TrustEVM$ lldb ./eos-evm-rpc-new
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'lldb.embedded_interpreter'
(lldb) target create "./eos-evm-rpc-new"
Current executable set to '/home/kayan-u20/workspaces/TrustEVM/eos-evm-rpc-new' (x86_64).
(lldb) run ./eos-evm-rpc-new --chain-id=15557 --api-spec=eth,debug,net,trace --http-port=0.0.0.0:8881 --eos-evm-node=127.0.0.1:8080 --chaindata=./chain-data
Process 624142 launched: '/home/kayan-u20/workspaces/TrustEVM/eos-evm-rpc-new' (x86_64)
  CRIT [02-13|02:44:39.294 UTC] Unknown option './eos-evm-rpc-new' passed as command line argument
Process 624142 exited with status = 0 (0x00000000) 
(lldb) run --chain-id=15557 --api-spec=eth,debug,net,trace --http-port=0.0.0.0:8881 --eos-evm-node=127.0.0.1:8080 --chaindata=./chain-data
Process 624532 launched: '/home/kayan-u20/workspaces/TrustEVM/eos-evm-rpc-new' (x86_64)
       [02-13|02:44:59.680 UTC] Silkrpc build info: eos-evm-rpc version: v1.0.5-f1d34c148f2ccd8b04f57a3a82cf751b91002542-dirty
       [02-13|02:44:59.680 UTC] Silkrpc libmdbx version: v0.12.0-71-g1cac6536 build: x86_64-ELF-Linux-Release compiler: cc (Ubuntu 11.4.0-2ubuntu1~20.04) 11.4.0
       [02-13|02:44:59.680 UTC] Silkrpc launched with datadir "./chain-data" using 8 contexts, 16 workers
       [02-13|02:44:59.686 UTC] Skip protocol version compatibility check with core services
       [02-13|02:44:59.686 UTC] Starting ETH RPC API at 0.0.0.0:8881 ENGINE RPC API at 
       [02-13|02:44:59.691 UTC] Silkrpc is now running [pid=624'532, main thread=140'737'322'681'920]
Process 624532 stopped
* thread #7, name = 'eos-evm-rpc-new', stop reason = signal SIGSEGV: invalid address (fault address: 0x7fffefe01000)
    frame #0: 0x00005555557f5570 eos-evm-rpc-new`intx::internal::udivrem_knuth(unsigned long*, unsigned long*, int, unsigned long const*, int) at intx.hpp:1689:9
   1686	        const auto u0 = u[j + dlen - 2];
   1687	
   1688	        uint64_t qhat{};
-> 1689	        if (INTX_UNLIKELY((uint128{u1, u2}) == divisor))  // Division overflows.
   1690	        {
   1691	            qhat = ~uint64_t{0};
   1692	
(lldb) bt
* thread #7, name = 'eos-evm-rpc-new', stop reason = signal SIGSEGV: invalid address (fault address: 0x7fffefe01000)
  * frame #0: 0x00005555557f5570 eos-evm-rpc-new`intx::internal::udivrem_knuth(unsigned long*, unsigned long*, int, unsigned long const*, int) at intx.hpp:1689:9
    frame #1: 0x00005555557f58cf eos-evm-rpc-new`intx::div_result<intx::uint<256u>, intx::uint<256u> > intx::udivrem<256u, 256u>(intx::uint<256u> const&, intx::uint<256u> const&) at intx.hpp:1744:28

@stephenpdeos stephenpdeos converted this from a draft issue Feb 12, 2025
@stephenpdeos stephenpdeos added bug Something isn't working 👍 lgtm labels Feb 12, 2025
@taokayan taokayan self-assigned this Feb 21, 2025
This was referenced Feb 21, 2025
@taokayan taokayan linked a pull request Feb 21, 2025 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working 👍 lgtm
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

2 participants