[ 
https://issues.apache.org/jira/browse/HDDS-6546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522504#comment-17522504
 ] 

Siyao Meng commented on HDDS-6546:
----------------------------------

So I've enabled trace logging in docker-compose.yaml by adding
{code}
      OZONE_OPTS: -Dhadoop.root.logger=TRACE,console
      OZONE_DAEMON_ROOT_LOGGER: TRACE,RFA
{code}
under SCM service.

Soon after I trigger the test loop I hit another bug? This time not 
PipelineNotFoundException from getPipeline but 2 out of 3 DNs are down, thus 
unable to form a RATIS 3 pipeline.

{code:title=Same robot test result failure}
==============================================================================
Generate :: Generate data
==============================================================================
Create a volume and bucket                                            | PASS |
------------------------------------------------------------------------------
Create key                                                            | FAIL |
255 != 0
------------------------------------------------------------------------------
Generate :: Generate data                                             | FAIL |
2 tests, 1 passed, 1 failed
==============================================================================
Output:  /tmp/smoketest/upgrade/result/robot-1.2.0-finalized-4.xml
Press any key to resume .. # <-- Note I added this in testlib.sh to pause the 
test run when it fails
{code}

{code:title=Same client error. Reproducible}
bash-4.2$ ozone admin safemode status
SCM is out of safe mode.
bash-4.2$ ozone sh key put /new2-volume/new2-bucket/new2-key 
/opt/hadoop/NOTICE.txt
INTERNAL_ERROR Allocated 0 blocks. Requested 1 blocks
{code}

{code:title=But (seemingly) different root cause}
scm_1    | 2022-04-14 18:44:44,887 [IPC Server handler 9 on default port 9863] 
TRACE protocol.ScmBlockLocationProtocolServerSideTranslatorPB: 
[service=BlockLocationProtocol] [type=AllocateScmBlock] request is received: 
<json>cmdType: AllocateScmBlock\ntraceID: ""\nversion: 
1\nallocateScmBlockRequest {\n  size: 268435456\n  numBlocks: 1\n  type: 
RATIS\n  factor: THREE\n  owner: "om3"\n  excludeList {\n  }\n}\n</json>
scm_1    | 2022-04-14 18:44:44,889 [IPC Server handler 9 on default port 9863] 
DEBUG server.SCMBlockProtocolServer: Allocating 1 blocks of size 268435456, 
with ExcludeList {datanodes = [], containerIds = [], pipelineIds = []}
scm_1    | 2022-04-14 18:44:44,889 [IPC Server handler 9 on default port 9863] 
TRACE block.BlockManagerImpl: Size : 268435456 , replicationConfig: RATIS/THREE
scm_1    | 2022-04-14 18:44:44,889 [IPC Server handler 9 on default port 9863] 
TRACE ha.SCMHAInvocationHandler: Invoking method public abstract java.util.List 
org.apache.hadoop.hdds.scm.pipeline.PipelineStateManager.getPipelines(org.apache.hadoop.hdds.client.ReplicationConfig,org.apache.hadoop.hdds.scm.pipeline.Pipeline$PipelineState,java.util.Collection,java.util.Collection)
 on target 
org.apache.hadoop.hdds.scm.pipeline.PipelineStateManagerImpl@173373b4 with 
arguments [RATIS/THREE, OPEN, [], []]
scm_1    | 2022-04-14 18:44:44,889 [IPC Server handler 9 on default port 9863] 
DEBUG ha.SCMHAInvocationHandler: Call: public abstract java.util.List 
org.apache.hadoop.hdds.scm.pipeline.PipelineStateManager.getPipelines(org.apache.hadoop.hdds.client.ReplicationConfig,org.apache.hadoop.hdds.scm.pipeline.Pipeline$PipelineState,java.util.Collection,java.util.Collection)
 took 0 ms
scm_1    | 2022-04-14 18:44:44,889 [IPC Server handler 9 on default port 9863] 
INFO pipeline.PipelineManagerImpl: Cannot create new pipelines while pipeline 
creation is frozen.
scm_1    | 2022-04-14 18:44:44,889 [IPC Server handler 9 on default port 9863] 
WARN pipeline.WritableRatisContainerProvider: Pipeline creation failed for 
repConfig: RATIS/THREE. Retrying get pipelines call once.
scm_1    | java.io.IOException: Cannot create new pipelines while pipeline 
creation is frozen.
scm_1    |      at 
org.apache.hadoop.hdds.scm.pipeline.PipelineManagerImpl.createPipeline(PipelineManagerImpl.java:165)
scm_1    |      at 
org.apache.hadoop.hdds.scm.pipeline.WritableRatisContainerProvider.getContainer(WritableRatisContainerProvider.java:119)
scm_1    |      at 
org.apache.hadoop.hdds.scm.pipeline.WritableContainerFactory.getContainer(WritableContainerFactory.java:52)
scm_1    |      at 
org.apache.hadoop.hdds.scm.block.BlockManagerImpl.allocateBlock(BlockManagerImpl.java:176)
scm_1    |      at 
org.apache.hadoop.hdds.scm.server.SCMBlockProtocolServer.allocateBlock(SCMBlockProtocolServer.java:194)
scm_1    |      at 
org.apache.hadoop.hdds.scm.protocol.ScmBlockLocationProtocolServerSideTranslatorPB.allocateScmBlock(ScmBlockLocationProtocolServerSideTranslatorPB.java:180)
scm_1    |      at 
org.apache.hadoop.hdds.scm.protocol.ScmBlockLocationProtocolServerSideTranslatorPB.processMessage(ScmBlockLocationProtocolServerSideTranslatorPB.java:130)
scm_1    |      at 
org.apache.hadoop.hdds.server.OzoneProtocolMessageDispatcher.processRequest(OzoneProtocolMessageDispatcher.java:87)
scm_1    |      at 
org.apache.hadoop.hdds.scm.protocol.ScmBlockLocationProtocolServerSideTranslatorPB.send(ScmBlockLocationProtocolServerSideTranslatorPB.java:112)
scm_1    |      at 
org.apache.hadoop.hdds.protocol.proto.ScmBlockLocationProtocolProtos$ScmBlockLocationProtocolService$2.callBlockingMethod(ScmBlockLocationProtocolProtos.java:13937)
scm_1    |      at 
org.apache.hadoop.ipc.ProtobufRpcEngine$Server.processCall(ProtobufRpcEngine.java:466)
scm_1    |      at 
org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:574)
scm_1    |      at 
org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:552)
scm_1    |      at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1093)
scm_1    |      at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:1035)
scm_1    |      at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:963)
scm_1    |      at java.base/java.security.AccessController.doPrivileged(Native 
Method)
scm_1    |      at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
scm_1    |      at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1878)
scm_1    |      at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2966)
{code}

Seems this time (almost) all DNs are down, according to SCM Web UI and Recon.

 !potential_bug2_scmwebui_1.png! 

 !potential_bug2_recon_1.png! 

 !potential_bug2_recon_2.png! 

btw I'm on latest master branch {{141ced1196d42330026148036e85f32317e011a4}} 
this time, only with some docker compose config changes to aid me in debugging 
the SCM issue.

> SCM attempts to allocate block in a CLOSED pipeline after upgrade finalization
> ------------------------------------------------------------------------------
>
>                 Key: HDDS-6546
>                 URL: https://issues.apache.org/jira/browse/HDDS-6546
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: test
>            Reporter: Siyao Meng
>            Priority: Critical
>         Attachments: acceptance-misc-run-6012168314.zip, 
> potential_bug2_recon_1.png, potential_bug2_recon_2.png, 
> potential_bug2_scmwebui_1.png
>
>
> Found in upgrade acceptance test (in GH action misc), which is especially 
> flaky recently:
> {code}
> 15:11:05.927  INFO    Running command 'ozone sh key put 
> /new2-volume/new2-bucket/new2-key /opt/hadoop/NOTICE.txt 2>&1'.       
> 15:11:08.856  INFO    ${rc} = 255     
> 15:11:08.856  INFO    ${output} = INTERNAL_ERROR Allocated 0 blocks. 
> Requested 1 blocks       
> {code}
> from https://github.com/apache/ozone/pull/3199#issuecomment-1081394937
> -Goal: Check and wait for SCM/DN readiness before creating key.-
> As [~erose] and I dug into the issue it seems there are some pipelineMap 
> inconsistencies happening on the SCM side, where a pipeline ID is retrieved 
> from {{query2OpenPipelines}} when SCM is trying to get an OPEN pipeline but 
> is already removed from {{pipelineMap}} in {{PipelineStateMap}} as it has 
> already been CLOSED previously:
> {code}
> scm_1    | 2022-03-23 14:56:32,154 [IPC Server handler 90 on default port 
> 9863] ERROR block.BlockManagerImpl: Pipeline Machine count is zero.
> scm_1    | org.apache.hadoop.hdds.scm.pipeline.PipelineNotFoundException: 
> PipelineID=8515aa81-2361-482a-82a8-bc5b5340dc23 not found
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.pipeline.PipelineStateMap.getPipeline(PipelineStateMap.java:157)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.pipeline.PipelineStateManagerImpl.getPipeline(PipelineStateManagerImpl.java:137)
> scm_1    |    at jdk.internal.reflect.GeneratedMethodAccessor3.invoke(Unknown 
> Source)
> scm_1    |    at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> scm_1    |    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.ha.SCMHAInvocationHandler.invokeLocal(SCMHAInvocationHandler.java:83)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.ha.SCMHAInvocationHandler.invoke(SCMHAInvocationHandler.java:68)
> scm_1    |    at com.sun.proxy.$Proxy16.getPipeline(Unknown Source)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.pipeline.PipelineManagerImpl.getPipeline(PipelineManagerImpl.java:212)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.block.BlockManagerImpl.newBlock(BlockManagerImpl.java:200)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.block.BlockManagerImpl.allocateBlock(BlockManagerImpl.java:180)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.server.SCMBlockProtocolServer.allocateBlock(SCMBlockProtocolServer.java:194)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.protocol.ScmBlockLocationProtocolServerSideTranslatorPB.allocateScmBlock(ScmBlockLocationProtocolServerSideTranslatorPB.java:180)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.protocol.ScmBlockLocationProtocolServerSideTranslatorPB.processMessage(ScmBlockLocationProtocolServerSideTranslatorPB.java:130)
> scm_1    |    at 
> org.apache.hadoop.hdds.server.OzoneProtocolMessageDispatcher.processRequest(OzoneProtocolMessageDispatcher.java:87)
> scm_1    |    at 
> org.apache.hadoop.hdds.scm.protocol.ScmBlockLocationProtocolServerSideTranslatorPB.send(ScmBlockLocationProtocolServerSideTranslatorPB.java:112)
> scm_1    |    at 
> org.apache.hadoop.hdds.protocol.proto.ScmBlockLocationProtocolProtos$ScmBlockLocationProtocolService$2.callBlockingMethod(ScmBlockLocationProtocolProtos.java:13937)
> scm_1    |    at 
> org.apache.hadoop.ipc.ProtobufRpcEngine$Server.processCall(ProtobufRpcEngine.java:466)
> scm_1    |    at 
> org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:574)
> scm_1    |    at 
> org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:552)
> scm_1    |    at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1093)
> scm_1    |    at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:1035)
> scm_1    |    at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:963)
> scm_1    |    at java.base/java.security.AccessController.doPrivileged(Native 
> Method)
> scm_1    |    at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
> scm_1    |    at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1878)
> scm_1    |    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2966)
> {code}
> while the pipeline {{8515aa81-2361-482a-82a8-bc5b5340dc23}} has obviously 
> been CLOSED earlier:
> {code}
> scm_1    | 2022-03-23 14:53:51,127 [IPC Server handler 0 on default port 
> 9860] INFO pipeline.PipelineManagerImpl: Pipeline Pipeline[ Id: 
> 630ef3dc-4fdf-4d5d-a72e-1f5feba433fa, Nodes: 
> c6fe6b6e-0b93-4766-9b16-2d622849069e{ip: 10.9.0.15, host: ha_dn1_1.ha_net, 
> ports: [REPLICATION=9886, RATIS=9858, RATIS_ADMIN=9857, RATIS_SERVER=9856, 
> STANDALONE=9859], networkLocation: /default-rack, certSerialId: null, 
> persistedOpState: IN_SERVICE, persistedOpStateExpiryEpochSec: 0}, 
> ReplicationConfig: RATIS/ONE, State:OPEN, 
> leaderId:c6fe6b6e-0b93-4766-9b16-2d622849069e, 
> CreationTimestamp2022-03-23T14:53:12.187247Z[UTC]] moved to CLOSED state
> scm_1    | 2022-03-23 14:53:51,127 [IPC Server handler 0 on default port 
> 9860] INFO pipeline.PipelineManagerImpl: Container #1 closed for 
> pipeline=PipelineID=8515aa81-2361-482a-82a8-bc5b5340dc23
> scm_1    | 2022-03-23 14:53:51,128 [IPC Server handler 0 on default port 
> 9860] INFO pipeline.PipelineManagerImpl: Container #3 closed for 
> pipeline=PipelineID=8515aa81-2361-482a-82a8-bc5b5340dc23
> scm_1    | 2022-03-23 14:53:51,131 [IPC Server handler 0 on default port 
> 9860] INFO pipeline.PipelineManagerImpl: Pipeline Pipeline[ Id: 
> 8515aa81-2361-482a-82a8-bc5b5340dc23, Nodes: 
> 1caafab5-8815-4e66-92ed-d7e53d381e4b{ip: 10.9.0.16, host: ha_dn2_1.ha_net, 
> ports: [REPLICATION=9886, RATIS=9858, RATIS_ADMIN=9857, RATIS_SERVER=9856, 
> STANDALONE=9859], networkLocation: /default-rack, certSerialId: null, 
> persistedOpState: IN_SERVICE, persistedOpStateExpiryEpochSec: 
> 0}45e92118-31a9-4b6f-9e18-0a4abff7f9e5{ip: 10.9.0.17, host: ha_dn3_1.ha_net, 
> ports: [REPLICATION=9886, RATIS=9858, RATIS_ADMIN=9857, RATIS_SERVER=9856, 
> STANDALONE=9859], networkLocation: /default-rack, certSerialId: null, 
> persistedOpState: IN_SERVICE, persistedOpStateExpiryEpochSec: 
> 0}c6fe6b6e-0b93-4766-9b16-2d622849069e{ip: 10.9.0.15, host: ha_dn1_1.ha_net, 
> ports: [REPLICATION=9886, RATIS=9858, RATIS_ADMIN=9857, RATIS_SERVER=9856, 
> STANDALONE=9859], networkLocation: /default-rack, certSerialId: null, 
> persistedOpState: IN_SERVICE, persistedOpStateExpiryEpochSec: 0}, 
> ReplicationConfig: RATIS/THREE, State:OPEN, 
> leaderId:1caafab5-8815-4e66-92ed-d7e53d381e4b, 
> CreationTimestamp2022-03-23T14:53:12.187694Z[UTC]] moved to CLOSED state
> {code}
> from 
> https://github.com/elek/ozone-build-results/blob/master/2022/03/23/13958/acceptance-misc/upgrade/1.1.0-1.2.0/docker-1.2.0-finalized.log#L3539-L3567
> And it seems that the issue dates back to at least Nov-Dec last year (2021):
> https://github.com/elek/ozone-build-results/blob/master/2021/12/08/11982/acceptance-misc/docker-1.2.0-finalized.log#L3269
> Potentially more (and earlier) failures can be found in 
> https://elek.github.io/ozone-build-results/
> Click into {{acceptance (misc)}} failures and there is a chance that you see 
> the same {{PipelineNotFoundException}} inside 
> {{./upgrade/1.1.0-1.2.0/docker-1.2.0-finalized.log}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to