<div dir="ltr">My gdb call stack reveals that the process gets stuck in gl_poll<br><br>Inside input_ready_cb(), function, there is a call to g_pollable_input_stream_read_nonblocking(), which never seems to finish. <div>And even though it says 'nonblocking', my single threaded program gets stuck here.</div><div><br><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">(gdb) bt</span><br></div><div><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">#0 0x0000007fb0297e6c in _</span><em style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">GI</em><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">__poll (fds=fds@entry=0x7fdea36d30, nfds=nfds@entry=1, timeout=timeout@entry=-1)</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">at /usr/src/debug/glibc/2.36-r0/sysdeps/unix/sysv/linux/poll.c:41</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">#1 0x0000007fb04a7c6c in g_poll (fds=fds@entry=0x7fdea36d30, nfds=nfds@entry=1, </span><b style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">timeout=timeout@entry=-1</b><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">)</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">at /usr/src/debug/glib-2.0/1_2.72.3-r0/glib/gpoll.c:125</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">#2 0x0000007fb06e7708 in g_unix_input_stream_read (stream=<optimized out>, buffer=0x7fdea36d78, count=2048, cancellable=0x0,</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">error=0x7fdea36d70) at /usr/src/debug/glib-2.0/1_2.72.3-r0/gio/gunixinputstream.c:348</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">#3 0x0000007faf128960 in <b>input_ready_cb</b> (istream=0x558e7c5660, self=0x558e7c4f10)</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">at /usr/src/debug/libqmi/1.32.4-r0/src/libqmi-glib/qmi-endpoint-qmux.c:73</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">#4 0x0000007fb0497f7c in g_main_dispatch (context=0x558e7527f0) at /usr/src/debug/glib-2.0/1_2.72.3-r0/glib/gmain.c:3417</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">#5 g_main_context_dispatch (context=context@entry=0x558e7527f0) at /usr/src/debug/glib-2.0/1_2.72.3-r0/glib/gmain.c:4135</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">#6 0x0000007fb049832c in g_main_context_iterate (context=0x558e7527f0, block=block@entry=1, dispatch=dispatch@entry=1,</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">self=<optimized out>) at /usr/src/debug/glib-2.0/1_2.72.3-r0/glib/gmain.c:4211</span><br style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px"><span style="color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">#7 0x0000007fb04986a8 in g_main_loop_run (loop=0x558e752b90) at /usr/src/debug/glib-2.0/1_2.72.3-r0/glib/gmain.c:4411</span><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 10, 2023 at 9:26 AM Sai Chaitanya <<a href="mailto:msaichaitanya@gmail.com">msaichaitanya@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><br>I am also getting the same issue. I am using libqmi 1.32.4. <br>Setup: RC7620 connected to Linux PC via a Sierra's REDmangOH board.<br><div>I am using the same set of APIs to configure the modem. </div><div>I have attached a sample code in my previous email.</div><div>I am attaching it now also, for your kind reference.</div><div><br>Also, we analyzed the QMDL logs and confirmed that the modem is sending information correctly, but libqmi is not picking up the information, but declaring 'timeout' instead.</div><div><br></div><div><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><strong style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box">MSG                      [      ds3gmmgsdiif.c   3101] Sending Request for Reading ICCID</span></strong></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><strong style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box">MSG                      [      ds3gmmgsdiif.c   5127] Sending Read Transparent on Session Type [0]for Session Id [2091824495]</span></strong></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><strong style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box">MSG                      [            qpIsim.c   3422] qpAMSSReadEF_USIM_ICCID - iLen=10</span></strong></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><strong style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box">MSG                      [            qpIsim.c   3458] qpAMSSReadEF_USIM_ICCID - ICCID is 89840480003887584858</span></strong></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><span style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box"><b>MSG                      [            qpIsim.c  12882] qpDplProcessSessionCardEvent - return status is 1</b><br><br>And like Truong Phi mentioned, it happens only sometimes. Not sure what is causing the issue.</span></span></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><span style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box"><br></span></span></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><span style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box">Any inputs towards fixing this are highly appreciated.</span></span></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><span style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box"><br></span></span></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><span style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box">Regards,</span></span></p><p style="box-sizing:border-box;margin:0px;padding:0px;color:rgba(0,0,0,0.8);font-family:"Titillium Web";font-size:13px"><span style="box-sizing:border-box"><span dir="ltr" style="box-sizing:border-box">Sai.</span></span></p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 10, 2023 at 6:35 AM Truong Phi <<a href="mailto:phitruong220675@gmail.com" target="_blank">phitruong220675@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">Hi,</div><div dir="auto"><br></div><div dir="auto">We are using some libqmi APIs like the below:</div><div dir="auto">qmi_client_uim_register_events_finish()</div><div dir="auto">qmi_client_uim_get_slot_status_finish()</div><div dir="auto">qmi_client_uim_get_card_status_finish()</div><div dir="auto">qmi_client_dms_swi_get_current_firmware_finish()</div><div dir="auto">qmi_client_dms_set_event_report_finish()</div><div dir="auto">qmi_client_uim_get_slot_status_finish()</div><div dir="auto"><br></div><div dir="auto">When testing for a long time, some of these APIs respond with an error message: "Transaction timed out".</div><div dir="auto"><br></div><div dir="auto">We checked the logs from the modem side and the chipset provider (Qualcomm) also confirmed with us that the modem replies to the QMI success.</div><div dir="auto">Example:</div><div dir="auto">In case qmi_client_uim_get_slot_status_finish()</div><div dir="auto">The module replied:</div><div dir="auto">...</div><div dir="auto">MsgType = QMI_UIM_GET_CARD_STATUS</div><div dir="auto">...</div><div dir="auto">resp {</div><div dir="auto">result = QMI_RESULT_SUCCESS</div><div dir="auto">error = QMI_ERR_NONE</div><div dir="auto">}</div><div dir="auto">...</div><div dir="auto"><br></div><div dir="auto">...</div><div dir="auto">MsgType = QMI_UIM_GET_SLOTS_STATUS</div><div dir="auto">...</div><div dir="auto">resp {</div><div dir="auto">result = QMI_RESULT_SUCCESS</div><div dir="auto">error = QMI_ERR_NONE</div><div dir="auto">}</div><div dir="auto">...</div><div dir="auto">physical_slot_status[0] {</div><div dir="auto">physical_card_status = UIM_PHYSICAL_CARD_STATE_PRESENT</div><div dir="auto">physical_slot_state = UIM_PHYSICAL_SLOT_STATE_ACTIVE</div><div dir="auto">...</div><div dir="auto"><br></div><div dir="auto">But the error message is: "Transaction timed out".</div><div dir="auto"><br></div><div dir="auto">Anything can be the cause of these problems? How can we avoid it?</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">Truong</div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"> </div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"> </div>