<div dir="ltr">It seems connection->cstate only update via P_CONN_ST_CHG_REQ, but drbd 8.3 send req via P_STATE_CHG_REQ.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-11 14:12 GMT+08:00 li songmin <span dir="ltr"><<a href="mailto:lisongmin9@gmail.com" target="_blank">lisongmin9@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>When I debug the crash, when oops occurs, the cstate of connection is C_WF_REPORT_PARAMS but not C_TEAR_DOWN.</div><div><br></div>So this problem may also occurs up to 8.4.10 in may opinion. <br><div><br></div><div>the order of change state and init ack_sender in conn_connect function is:<br></div><div><br><div>```<br> rv = conn_request_state(connection, NS(conn, C_WF_REPORT_PARAMS), CS_VERBOSE); <-- change cstate here<br> if (rv < SS_SUCCESS || connection->cstate != C_WF_REPORT_PARAMS) {<br> clear_bit(STATE_SENT, &connection->flags);<br> return 0;<br> }<br><br> drbd_thread_start(&connection-<wbr>>ack_receiver);<br> /* opencoded create_singlethread_workqueue(<wbr>),<br> * to be able to use format string arguments */<br> connection->ack_sender = <wbr> <-- init ack_sender here<br>#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)<br> alloc_ordered_workqueue("drbd_<wbr>as_%s", WQ_MEM_RECLAIM, connection->resource->name);<br>#else<br> create_singlethread_workqueue(<wbr>"drbd_ack_sender");<br>#endif<br> if (!connection->ack_sender) {<br> drbd_err(connection, "Failed to create workqueue ack_sender\n");<br> return 0;<br> }<br><br>```</div><div><br></div><div>and the oops point valid ack_sender by cstate:</div><div><br></div><div>```</div><div> if (connection->cstate >= C_WF_REPORT_PARAMS) {<br> kref_get(&device->kref); /* put is in drbd_send_acks_wf() */<br> if (!queue_work(connection->ack_<wbr>sender, &peer_device->send_acks_work))<wbr> <-- oops here.<br> kref_put(&device->kref, drbd_destroy_device);<br> }<br></div><div>```<br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-08-10 18:21 GMT+08:00 Lars Ellenberg <span dir="ltr"><<a href="mailto:lars.ellenberg@linbit.com" target="_blank">lars.ellenberg@linbit.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Aug 09, 2017 at 05:20:22PM +0800, li songmin wrote:<br>
> Hi,<br>
><br>
> when I upgrade fdrbd rom 8.3.15 to 8.4.6-5, there is an oops cause by NULL<br>
> pointer Error.<br>
<br>
</span>We are at 8.4.10 already.<br>
Just saying.<br>
<span><br>
><br>
> upgrade step as follow:<br>
><br>
> 1. primary node work as normal<br>
> 2. stop drbd 8.3.15 on secondary node, and upgrade it to 8.4.6-5.<br>
> 3. start secondary node, now data begin sync from primary node.<br>
> 4. upgrade primary node with follow step<br>
> 1. stop business service on drbd<br>
> 2. disconnect drbd for unmount quickly <-- oops on secondary node<br>
> here?<br>
<br>
</span>Why disconnect?<br>
<span><br>
> 3. umount filesystem<br>
> 4. primary -> secondary<br>
> 5. connect drbd and waiting sync complete.<br>
> 6. business service may start on secondary node now.<br>
> 7. stop drbd 8.3.15 on primary node, and upgrade it to 8.4.6-5.<br>
><br>
> call stack:<br>
<br>
</span><span>> <4>[66071017.155051] Modules linked in: softdog drbd(FN)<br>
<br>
</span>What did you need to force the module for?<br>
Probably *that* is your problem right there.<br>
<span class="m_2996202087699970328HOEnZb"><font color="#888888"><br>
<br>
--<br>
: Lars Ellenberg<br>
: LINBIT | Keeping the Digital World Running<br>
: DRBD -- Heartbeat -- Corosync -- Pacemaker<br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT<br>
__<br>
please don't Cc me, but send to list -- I'm subscribed<br>
______________________________<wbr>_________________<br>
drbd-user mailing list<br>
<a href="mailto:drbd-user@lists.linbit.com" target="_blank">drbd-user@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-user" rel="noreferrer" target="_blank">http://lists.linbit.com/mailma<wbr>n/listinfo/drbd-user</a><br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>