Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdb on setuptools "ValueError: underlying buffer has been detached" #80260

Open
gerritholl mannequin opened this issue Feb 22, 2019 · 1 comment
Open

pdb on setuptools "ValueError: underlying buffer has been detached" #80260

gerritholl mannequin opened this issue Feb 22, 2019 · 1 comment
Labels
stdlib Python modules in the Lib dir

Comments

@gerritholl
Copy link
Mannequin

gerritholl mannequin commented Feb 22, 2019

BPO 36079
Nosy @gerritholl

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-02-22.14:42:18.620>
labels = []
title = 'pdb on setuptools "ValueError: underlying buffer has been detached"'
updated_at = <Date 2019-02-22.14:42:18.620>
user = 'https://github.com/gerritholl'

bugs.python.org fields:

activity = <Date 2019-02-22.14:42:18.620>
actor = 'Gerrit.Holl'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2019-02-22.14:42:18.620>
creator = 'Gerrit.Holl'
dependencies = []
files = []
hgrepos = []
issue_num = 36079
keywords = []
message_count = 1.0
messages = ['336316']
nosy_count = 1.0
nosy_names = ['Gerrit.Holl']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue36079'
versions = ['Python 3.6']

@gerritholl
Copy link
Mannequin Author

gerritholl mannequin commented Feb 22, 2019

I am unable to use pdb to debug a problem I have with the python-hdf4 installer. The exception in the program to be debugged is printed twice, followed by an exception in pdb itself, ending with ValueError: underlying buffer has been detached. See below, in particular the lower part:

$ python -mpdb setup.py install
python -mpdb setup.py install                                                                                            
> /panfs/e/vol0/gholl/checkouts/python-hdf4/setup.py(11)<module>()                                                       
-> """                                                                                                               
(Pdb) cont                                                                                                           
running install                                                                                                              
running bdist_egg                                                                                                            
running egg_info                                                                                                                     
running build_src                                                                                                                    
build_src                                                                                                            
building extension "pyhdf._hdfext" sources                                                                                   
build_src: building npy-pkg config files                                                                                       
writing python_hdf4.egg-info/PKG-INFO                                                                                                
writing dependency_links to python_hdf4.egg-info/dependency_links.txt                                                       
writing top-level names to python_hdf4.egg-info/top_level.txt                                                               
reading manifest file 'python_hdf4.egg-info/SOURCES.txt'                                                                 
writing manifest file 'python_hdf4.egg-info/SOURCES.txt'                                                                       
installing library code to build/bdist.linux-x86_64/egg
running install_lib                                                                                                         
running build_py                                               
running build_ext                                                                                                        
customize UnixCCompiler                                                           
customize UnixCCompiler using build_ext                                                                                                                                                           
building 'pyhdf._hdfext' extension                                                                
compiling C sources                              
C compiler: gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
                                                                                  
compile options: '-I/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/core/include -I/panfs/e/vol0/gholl/venv/py36/include -I/hpc/rhome/software/python/3.6.5/include/python3.6m -c'
extra options: '-DNOSZIP'                                                               
Traceback (most recent call last):                                                
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1667, in main                            
    pdb._runscript(mainpyfile)                                                          
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1548, in _runscript                     
    self.run(statement)                                                                        
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/bdb.py", line 434, in run                              
    exec(cmd, globals, locals)                                                                                
  File "<string>", line 1, in <module>                                                                       
  File "/panfs/e/vol0/gholl/checkouts/python-hdf4/setup.py", line 11, in <module>                            
    """                                                                                            
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/core.py", line 171, in setup
    return old_setup(**new_attr)                                                                                      
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/install.py", line 62, in run
    r = self.setuptools_run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/install.py", line 56, in setuptools_run
    self.do_egg_install()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 172, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
    self.run_command(cmdname)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/build_ext.py", line 261, in run
    self.build_extensions()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/build_ext.py", line 379, in build_extension
    **kws)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 92, in <lambda>
    m = lambda self, *args, **kw: func(self, *args, **kw)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 363, in CCompiler_compile
    single_compile(o)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 305, in single_compile
    if not _needs_build(obj, cc_args, extra_postargs, pp_opts):
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 64, in _needs_build
    last_cmdline = lines[-1]
IndexError: list index out of range
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
Traceback (most recent call last):
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1667, in main
    pdb._runscript(mainpyfile)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1548, in _runscript
    self.run(statement)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/bdb.py", line 434, in run
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/panfs/e/vol0/gholl/checkouts/python-hdf4/setup.py", line 11, in <module>
    """
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/core.py", line 171, in setup
    return old_setup(**new_attr)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/install.py", line 62, in run
    r = self.setuptools_run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/install.py", line 56, in setuptools_run
    self.do_egg_install()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 172, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
    self.run_command(cmdname)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/build_ext.py", line 261, in run
    self.build_extensions()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/command/build_ext.py", line 379, in build_extension
    **kws)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 92, in <lambda>
    m = lambda self, *args, **kw: func(self, *args, **kw)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 363, in CCompiler_compile
    single_compile(o)
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 305, in single_compile
    if not _needs_build(obj, cc_args, extra_postargs, pp_opts):
  File "/panfs/e/vol0/gholl/venv/py36/lib/python3.6/site-packages/numpy/distutils/ccompiler.py", line 64, in _needs_build
    last_cmdline = lines[-1]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1694, in <module>
    pdb.main()
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1686, in main
    pdb.interaction(None, t)
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 351, in interaction
    self.print_stack_entry(self.stack[self.curindex])
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 1453, in print_stack_entry
    self.format_stack_entry(frame_lineno, prompt_prefix))
  File "/hpc/rhome/software/python/3.6.5/lib/python3.6/pdb.py", line 453, in message
    print(msg, file=self.stdout)
ValueError: underlying buffer has been detached

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@iritkatriel iritkatriel added the stdlib Python modules in the Lib dir label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

1 participant