eos icon indicating copy to clipboard operation
eos copied to clipboard

RAM bug

Open KrakenAI opened this issue 8 years ago • 22 comments

Hi, I have buy/sell RAM from RAM market without problem for a week but today I have facing with RAM bug.

{"code":500,"message":"Internal Service Error","error":{"code":3080001,"name":"ram_usage_exceeded","what":"account using more than allotted RAM usage","details":[]}}

My ram quota is 2113715 bytes and I want to sell just 8192 bytes.

I have report it to EOS Authority, and Rohan get in to help me.

I ask Rohan to get my account info from their API endpoint. He say I have 2MB of RAM which I said above. I have create new signed transaction to sell 8196 bytes RAM and send to Rohan to submit to the network and he also get the same error result.

Rohan said "Just say, Rohan @EOSAuthority looked into it and we both couldn’t figure out what the issue was…"

He also say it might be something around here https://github.com/EOSIO/eos/blob/4d90af7fce073d5024f2648631088824379c700b/libraries/chain/resource_limits.cpp#L182

I have also try to manual create transaction by eosjs, EOSToolkit, FeeXplorer. All those tools show I have 2MB and I can't sell even if 8192 bytes.

I have try many API endpoint and it's not working.

If anyone want my signed transaction to get proof that it's bug. You can add my telegram kenjiroai

KrakenAI avatar Jul 06 '18 06:07 KrakenAI

could you please provide your account? haven't been able to PM you on telegram because of your privacy settings maybe.

JohnnyZhao avatar Jul 06 '18 07:07 JohnnyZhao

@JohnnyZhao Could you please add my telegram again? I have set new privacy. https://t.me/KenjiroAI

KrakenAI avatar Jul 06 '18 07:07 KrakenAI

still couldnt add you, add me on telegram: zhaoyu

JohnnyZhao avatar Jul 06 '18 08:07 JohnnyZhao

I am facing same problem now.

redsung avatar Jul 06 '18 08:07 redsung

image Account eosio.ram has used up almost 100% of its ram, maybe the issue is related to this?

dryruner avatar Jul 06 '18 08:07 dryruner

@JohnnyZhao OK, Added @redsung You can't sell any amount of ram, right? Could you please add me in telegram? We will discuss more details about this

KrakenAI avatar Jul 06 '18 08:07 KrakenAI

@KenjiroAI Please add me as well. My telegram : jirao

littlekfc avatar Jul 06 '18 08:07 littlekfc

Do you have enough EOS in your account for ramfee?

There is an INLINE_ACTION_SENDER which require ramfee. see here.

if( fee > 0 ) {
    INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {account,N(active)},
    { account, N(eosio.ramfee), asset(fee), std::string("sell ram fee") } );
}

spartucus avatar Jul 06 '18 08:07 spartucus

@jonnyhsy Might be not because it affect only some account @littlekfc Added @spartucus I think It reduce from amount of sell not from my account because I have always all in RAM before without any problem.

KrakenAI avatar Jul 06 '18 08:07 KrakenAI

@dhaneshvb Why you close this issue? My problem is not solve yet. Many people facing with this problem.

KrakenAI avatar Jul 06 '18 08:07 KrakenAI

Why closed......

d553296416 avatar Jul 06 '18 08:07 d553296416

Hi @KenjiroAI, that's weird, from what i have known, if inline action fails, the transaction fails too, please correct me if i am wrong.

reference here.

Inline communication takes the form of requesting other actions that need to be executed as part of the calling action. Inline actions operate with the same scopes and authorities of the original transaction, and are guaranteed to execute with the current transaction. These can effectively be thought of as nested transactions within the calling transaction. If any part of the transaction fails, the inline actions will unwind with the rest of the transaction. Calling the inline action generates no notification outside the scope of the transaction, regardless of success or failure.

spartucus avatar Jul 06 '18 08:07 spartucus

So the error may be from here:

eosio.system/delegate_bandwidth.cpp:191
INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {N(eosio.ram),N(active)},
                                                       { N(eosio.ram), account, asset(tokens_out), std::string("sell ram") } );

I will try on local private eos node.

paritygeeker avatar Jul 06 '18 09:07 paritygeeker

Closed by mistake, sorry about that. Reopened

dhaneshvb avatar Jul 06 '18 09:07 dhaneshvb

@KenjiroAI I think it's totally possible, see the two lines of code @paritygeeker referenced, eosio.ram account needs to transfer system tokens.

To explain why some succeeded but some failed - eosio.ram's ram usage actually fluctuates as ppl buy/sell rams...

dryruner avatar Jul 06 '18 09:07 dryruner

Wow! I'm not expecting it to happen this way.

@spartucus Confirm, the bug is from INLINE_ACTION_SENDER as you said and I can sell it before might be as @jonnyhsy explain.

Thanks :)

KrakenAI avatar Jul 06 '18 09:07 KrakenAI

one possible reason is that your account doesn't have any EOS, but "eosio.ram" can't create the balance row for your account due to not having enough ram. If this is really the case, try to transfer some (0.0001) EOS to your account then do sellram again.

taokayan avatar Jul 06 '18 10:07 taokayan

thanks, I transferred some eos to my account fix this

d553296416 avatar Jul 06 '18 10:07 d553296416

@taokayan Yeah, the problem solved. Should we set infinity RAM for eosio.ram?

KrakenAI avatar Jul 06 '18 10:07 KrakenAI

Not really. The balance row memory usage should be paid by the user instead of eosio.ram, this is similar to "steal" RAM from eosio.ram.

taokayan avatar Jul 06 '18 10:07 taokayan