久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <legend id='YouOS'><style id='YouOS'><dir id='YouOS'><q id='YouOS'></q></dir></style></legend>
    • <bdo id='YouOS'></bdo><ul id='YouOS'></ul>

        <small id='YouOS'></small><noframes id='YouOS'>

      1. <i id='YouOS'><tr id='YouOS'><dt id='YouOS'><q id='YouOS'><span id='YouOS'><b id='YouOS'><form id='YouOS'><ins id='YouOS'></ins><ul id='YouOS'></ul><sub id='YouOS'></sub></form><legend id='YouOS'></legend><bdo id='YouOS'><pre id='YouOS'><center id='YouOS'></center></pre></bdo></b><th id='YouOS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YouOS'><tfoot id='YouOS'></tfoot><dl id='YouOS'><fieldset id='YouOS'></fieldset></dl></div>
      2. <tfoot id='YouOS'></tfoot>

        如何調試 Python 分段錯誤?

        How to debug a Python segmentation fault?(如何調試 Python 分段錯誤?)
        • <bdo id='LIGaJ'></bdo><ul id='LIGaJ'></ul>
        • <tfoot id='LIGaJ'></tfoot>

              <legend id='LIGaJ'><style id='LIGaJ'><dir id='LIGaJ'><q id='LIGaJ'></q></dir></style></legend>
                <tbody id='LIGaJ'></tbody>
              <i id='LIGaJ'><tr id='LIGaJ'><dt id='LIGaJ'><q id='LIGaJ'><span id='LIGaJ'><b id='LIGaJ'><form id='LIGaJ'><ins id='LIGaJ'></ins><ul id='LIGaJ'></ul><sub id='LIGaJ'></sub></form><legend id='LIGaJ'></legend><bdo id='LIGaJ'><pre id='LIGaJ'><center id='LIGaJ'></center></pre></bdo></b><th id='LIGaJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='LIGaJ'><tfoot id='LIGaJ'></tfoot><dl id='LIGaJ'><fieldset id='LIGaJ'></fieldset></dl></div>

                <small id='LIGaJ'></small><noframes id='LIGaJ'>

                  本文介紹了如何調試 Python 分段錯誤?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  如何調試 Python 分段錯誤?

                  How can I debug a Python segmentation fault?

                  我們正在嘗試在 SuSE 12.3 上運行我們的 python 代碼.我們得到可重現的分段錯誤.多年來,python 代碼一直在其他平臺上運行,沒有出現分段錯誤.

                  We are trying to run our python code on SuSE 12.3. We get reproducible segmentation faults. The python code has been working on other platforms without segmentation faults, for years.

                  我們只編寫 Python 代碼,沒有 C 擴展......

                  We only code Python, no C extension ....

                  調試此問題的最佳方法是什么?我知道一點ansi c,但那是十年前的事了....

                  What is the best way to debug this? I know a bit ansi c, but that was ten years ago ....

                  Python 2.7.5

                  Python 2.7.5

                  更新

                  分段錯誤發生在解釋器關閉時.

                  The segmentation fault happens on interpreter shutdown.

                  我可以多次運行腳本:

                  python -m pdb myscript.py arg1 arg1
                  continue
                  run
                  continue
                  run
                  

                  但是如果我用 ctrl-d 離開 pdb,就會發生分段錯誤.

                  But the segmentation faults happen, if I leave the pdb with ctrl-d.

                  更新 2

                  我現在嘗試用 gdb 調試它:

                  I now try to debug it with gdb:

                  gdb 
                  > file python
                  > run myscript.py arg1 arg2
                  Program received signal SIGSEGV, Segmentation fault.
                  [Switching to Thread 0x7fffefbe2700 (LWP 15483)]
                  0x00007ffff7aef93c in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
                  (gdb) bt
                  #0  0x00007ffff7aef93c in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
                  #1  0x00007ffff7af5303 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.7.so.1.0
                  #2  0x00007ffff7adc858 in ?? () from /usr/lib64/libpython2.7.so.1.0
                  #3  0x00007ffff7ad840d in PyObject_Call () from /usr/lib64/libpython2.7.so.1.0
                  #4  0x00007ffff7af1082 in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
                  #5  0x00007ffff7af233d in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
                  #6  0x00007ffff7af233d in PyEval_EvalFrameEx () from /usr/lib64/libpython2.7.so.1.0
                  #7  0x00007ffff7af5303 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.7.so.1.0
                  #8  0x00007ffff7adc5b6 in ?? () from /usr/lib64/libpython2.7.so.1.0
                  #9  0x00007ffff7ad840d in PyObject_Call () from /usr/lib64/libpython2.7.so.1.0
                  #10 0x00007ffff7ad9171 in ?? () from /usr/lib64/libpython2.7.so.1.0
                  #11 0x00007ffff7ad840d in PyObject_Call () from /usr/lib64/libpython2.7.so.1.0
                  #12 0x00007ffff7aeeb62 in PyEval_CallObjectWithKeywords () from /usr/lib64/libpython2.7.so.1.0
                  #13 0x00007ffff7acc757 in ?? () from /usr/lib64/libpython2.7.so.1.0
                  #14 0x00007ffff7828e0f in start_thread () from /lib64/libpthread.so.0
                  #15 0x00007ffff755c7dd in clone () from /lib64/libc.so.6
                  

                  更新 3

                  我從 http://hg.python.org/cpython/安裝了 gdbinit文件/默認/Misc/gdbinit以及來自 http://download.opensuse.org 的調試符號/debug/distribution/12.3/repo/oss/suse/x86_64/

                  (gdb) pystack
                  No symbol "_PyUnicode_AsString" in current context.
                  

                  現在呢?

                  更新 4我們安裝了一個新的 RPM (python-2.7.5-3.1.x86_64).我們得到的段錯誤更少,但它們仍然會發生.這是存儲庫的鏈接:

                  Update 4 We installed the a new RPM (python-2.7.5-3.1.x86_64). We get less segfaults, but they still happen. Here is the link to repository:

                  http://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_12.3/x86_64/

                  更新 5解決了我最初的問題:

                  原來是http://bugs.python.org/issue1856(關機(退出)可以掛或運行守護線程的段錯誤)

                  It was http://bugs.python.org/issue1856 (shutdown (exit) can hang or segfault with daemon threads running)

                  相關:檢測解釋器在守護線程中關閉

                  推薦答案

                  我是因為Segmentation fault才遇到這個問題的,但是在exit的時候沒有,一般情況下,我發現沒有別的了與 faulthandler 一樣有效.它是 Python 3.3 的一部分,您可以使用 pip 在 2.7 中安裝.

                  I got to this question because of the Segmentation fault, but not on exit, just in general, and I found that nothing else helped as effectively as faulthandler. It's part of Python 3.3, and you can install in 2.7 using pip.

                  這篇關于如何調試 Python 分段錯誤?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to bind a function to an Action from Qt menubar?(如何將函數綁定到 Qt 菜單欄中的操作?)
                  PyQt progress jumps to 100% after it starts(PyQt 啟動后進度躍升至 100%)
                  How to set yaxis tick label in a fixed position so that when i scroll left or right the yaxis tick label should be visible?(如何將 yaxis 刻度標簽設置在固定位置,以便當我向左或向右滾動時,yaxis 刻度標簽應該可見
                  `QImage` constructor has unknown keyword `data`(`QImage` 構造函數有未知關鍵字 `data`)
                  Change x-axis ticks to custom strings(將 x 軸刻度更改為自定義字符串)
                  How to show progress bar while saving file to excel in python?(如何在python中將文件保存為excel時顯示進度條?)

                    1. <i id='vDOKW'><tr id='vDOKW'><dt id='vDOKW'><q id='vDOKW'><span id='vDOKW'><b id='vDOKW'><form id='vDOKW'><ins id='vDOKW'></ins><ul id='vDOKW'></ul><sub id='vDOKW'></sub></form><legend id='vDOKW'></legend><bdo id='vDOKW'><pre id='vDOKW'><center id='vDOKW'></center></pre></bdo></b><th id='vDOKW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vDOKW'><tfoot id='vDOKW'></tfoot><dl id='vDOKW'><fieldset id='vDOKW'></fieldset></dl></div>
                          <tbody id='vDOKW'></tbody>
                          <bdo id='vDOKW'></bdo><ul id='vDOKW'></ul>

                          <small id='vDOKW'></small><noframes id='vDOKW'>

                          1. <tfoot id='vDOKW'></tfoot>

                            <legend id='vDOKW'><style id='vDOKW'><dir id='vDOKW'><q id='vDOKW'></q></dir></style></legend>

                            主站蜘蛛池模板: 一区二区三区中文字幕 | 国产精品久久亚洲 | 日本黄色高清视频 | 成人老司机 | 亚洲九九色 | 91精品国产色综合久久不卡98 | 噜久寡妇噜噜久久寡妇 | 欧美性一级 | 亚洲精品电影在线观看 | 欧美bondage紧缚视频 | 在线不卡视频 | 久产久精国产品 | 免费观看色 | 日韩在线观看一区 | 午夜精品一区二区三区在线播放 | 免费国产一区二区视频 | 日韩三级在线观看 | 人人人干 | 九九综合| 麻豆国产一区二区三区四区 | 91精品在线播放 | 天天操天天干天天透 | 91久久视频 | 欧美日韩在线免费 | 中文字幕中文字幕 | 国内av在线| 久久久毛片| 国产三级网站 | 天天操天天摸天天干 | 99国内精品久久久久久久 | 狠狠操狠狠搞 | 亚洲午夜精品视频 | 日韩精品不卡 | 国产一区二区三区视频 | 久久久人| 久久综合伊人 | 国产精品视频在线观看 | 国产欧美一区二区久久性色99 | 欧美精品中文 | 国产区在线看 | 亚洲精品68久久久一区 |