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

Crash when a process is pinned in the develop branch of Glances #2639

Closed
nicolargo opened this issue Jan 3, 2024 · 1 comment
Closed

Crash when a process is pinned in the develop branch of Glances #2639

nicolargo opened this issue Jan 3, 2024 · 1 comment
Labels
Milestone

Comments

@nicolargo
Copy link
Owner

Describe the bug
Pin a process...
Then:

                                                                                                                                                                                                                                             File "<frozen runpy>", line 88, in _run_code
                                             File "/app/glances/__main__.py", line 18, in <module>
                                                                                                      glances.main()
                                                                                                                      File "/app/glances/__init__.py", line 184, in main
                                                                                                                                                                            start(config=core.get_config(), args=core.get_args())
                                                                                                                                                                                                                                   File "/app/glances/__init__.py", line 130, in start
                                            mode.serve_forever()
                                                                  File "/app/glances/standalone.py", line 181, in serve_forever
                                                                                                                                   while self.__serve_once():
                                                                                                                                                                       ^^^^^^^^^^^^^^^^^^^
                                                                                                                                                                                            File "/app/glances/standalone.py", line 160, in __serve_once
              ret = not self.screen.update(self.stats, duration=adapted_refresh)
                                                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                                                                                                                        File "/app/glances/outputs/glances_curses.py", line 1252, in update
                                                                                                                                                                                                                               self.flush(stats, cs_status=cs_status)
                         File "/app/glances/outputs/glances_curses.py", line 1198, in flush
                                                                                               self.display(stats, cs_status=cs_status)
                                                                                                                                         File "/app/glances/outputs/glances_curses.py", line 695, in display
                                                                                                                                                                                                                __stat_display["processlist"] = stats.get_plugin('processlist').get_stats_display(args=self.args)
                                                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                                                                                                                                          File "/app/glances/plugins/plugin/model.py", line 922, in get_stats_display
           ret = {'display': display_curse, 'msgdict': self.msg_curse(args), 'align': align_curse}
                                                                                                                                                  ^^^^^^^^^^^^^^^^^^^^
                                                                                                                                                                        File "/app/glances/plugins/processlist/__init__.py", line 462, in msg_curse
         self.__msg_curse_extended_process(ret, glances_processes.extended_process)
                                                                                     File "/app/glances/plugins/processlist/__init__.py", line 519, in __msg_curse_extended_process
                                                                                                                                                                                       self.__msg_curse_extended_process_thread(ret, p)
                                                                                                                                                                                                                                         File "/app/glances/plugins/processlist/__init__.py", line 583, in __msg_curse_extended_process_thread
                                                                                                    for k, v in p['memory_info'].items():
                                                                                                                                                         ^^^^^^^^^^^^^^^^^^^^^^
                                                                                                                                                                               AttributeError: 'pmem' object has no attribute 'items'

To Reproduce
Steps to reproduce the behavior:

  1. Start Glances with the following options : None, started from the dev image container
  2. Press the key 'e'
  3. See error

Expected behavior
No error and the process should be pinned.

Environement (please complete the following information)

2024-01-03 07:46:32,944 -- INFO -- Start Glances 4.0.0_beta01
2024-01-03 07:46:32,944 -- INFO -- CPython 3.11.6 (/venv/bin/python3) and psutil 5.9.7 detected
2024-01-03 07:46:32,979 -- INFO -- Start GlancesStandalone mode
2024-01-03 07:46:33,131 -- ERROR -- containers (Podman) plugin - Can't connect to Podman (http://%2Frun%2Fuser%2F1000%2Fpodman%2Fpodman.sock/v4.8.1/libpod/_ping (HEAD operation failed))
2024-01-03 07:46:35,599 -- INFO -- Issue mode is ON
===============================================================================
Glances 4.0.0_beta01 (/app/glances/__init__.py)
Python 3.11.6 (/venv/bin/python3)
PsUtil 5.9.7 (/venv/lib/python3.11/site-packages/psutil/__init__.py)
===============================================================================
alert         [OK]    0.00002s 
[{'avg': 26.8,
  'begin': 1704267993.0,
  'count': 1,
  'desc': '',
  'end': -1,
  'max': 26.8,
  'min': 26.8,
  'sort': 'io_counters',
  'state': 'CRITICAL',
  'sum': 26.8,
  'top': [],
  'type': 'CPU_IOWAIT'}]
amps          [OK]    0.00006s 
[]
cloud         [OK]    0.00003s 
{}
connections   [OK]    0.01369s 
{'ESTABLISHED': 7,
 'LISTEN': 5,
 'SYN_RECV': 0,
 'SYN_SENT': 0,
 'initiated': 0,
 'net_connections_enabled': True,
 'nf_conntrack_count': 78.0,
 'nf_conntrack_enabled': True,
 'nf_conntrack_max': 262144.0,
 'nf_conntrack_percent': 0.029754638671875,
 'terminated': 0}
containers    [OK]    0.01208s key=name 
[{'command': '/bin/sh -c /venv/bin/python3 -m glances $GLANCES_OPT',
  'cpu_percent': 0.10304239401496258,
  'created': '2024-01-03T07:46:32.681058947Z',
  'engine': 'docker',
  'id': 'ea406afe70f8c5b5912e0b5090b12744d3972e9c7a80670b9892322daffa958b',
  'image': ('docker-ccsl-virtual.repo.aes.alcatel.fr:8443/nicolargo/glances:dev',),
  'io_rx': 151552,
  'io_wx': 0,
  'key': 'name',
  'memory_usage': 50290688,
  'name': 'suspicious_golick',
  'status': 'running',
  'uptime': 'just now'}, ...]
core          [OK]    0.00066s 
{'log': 8, 'phys': 4}
cpu           [OK]    0.00044s 
{'cpucore': 8,
 'ctx_switches': 34600,
 'guest': 0.0,
 'guest_nice': 0.0,
 'idle': 61.1,
 'interrupts': 14965,
 'iowait': 35.2,
 'irq': 0.2,
 'nice': 0.0,
 'soft_interrupts': 2905,
 'softirq': 0.1,
 'steal': 0.0,
 'syscalls': 0,
 'system': 1.0,
 'time_since_update': 2.0300464630126953,
 'total': 9.8,
 'user': 2.3}
diskio        [OK]    0.00055s key=disk_name 
[{'disk_name': 'sda',
  'key': 'disk_name',
  'read_bytes': 2097152,
  'read_count': 4,
  'time_since_update': 2.0303313732147217,
  'write_bytes': 0,
  'write_count': 0}, ...]
folders       [OK]    0.00004s 
[]
fs            [OK]    0.00059s key=mnt_point 
[{'device_name': '/dev/mapper/rhel-root00',
  'free': 59700465664,
  'fs_type': 'xfs',
  'key': 'mnt_point',
  'mnt_point': '/etc/resolv.conf',
  'percent': 20.5,
  'size': 75125227520,
  'used': 15424761856}, ...]
gpu           [OK]    0.00003s 
[]
help          [OK]    0.00001s 
None
ip            [OK]    0.00064s 
{'address': '***',
 'gateway': '***',
 'mask': '***',
 'mask_cidr': '***',
 'public_address': '***',
 'public_info_human': '***'}
irq           [OK]    0.00053s key=irq_line 
[{'irq_line': 'LOC', 'irq_rate': 17936, 'key': 'irq_line', 'time_since_update': 2.347752571105957}, ...]
load          [OK]    0.00004s 
{'cpucore': 8, 'min1': 4.31591796875, 'min15': 2.91455078125, 'min5': 3.90087890625}
mem           [OK]    0.00017s 
{'active': 5024362496,
 'available': 26044203008,
 'buffers': 7661342720,
 'cached': 18701684736,
 'free': 26044203008,
 'inactive': 25887428608,
 'percent': 21.3,
 'shared': 107847680,
 'total': 33084997632,
 'used': 7040794624}
memswap       [OK]    0.00023s 
{'free': 14677962752,
 'percent': 12.4,
 'sin': 11087872,
 'sout': 2081009664,
 'time_since_update': 2.3478949069976807,
 'total': 16752046080,
 'used': 2074083328}
network       [OK]    0.00089s key=interface_name 
[{'alias': None,
  'cumulative_cx': 113108,
  'cumulative_rx': 56554,
  'cumulative_tx': 56554,
  'cx': 0,
  'interface_name': 'lo',
  'is_up': True,
  'key': 'interface_name',
  'rx': 0,
  'speed': 0,
  'time_since_update': 2.033085346221924,
  'tx': 0}, ...]
now           [OK]    0.00002s 
'2024-01-03 07:46:37 UTC'
percpu        [OK]    0.00008s key=cpu_number 
[{'cpu_number': 0,
  'guest': 0.0,
  'guest_nice': 0.0,
  'idle': 0.0,
  'iowait': 51.6,
  'irq': 0.4,
  'key': 'cpu_number',
  'nice': 0.0,
  'softirq': 0.0,
  'steal': 0.0,
  'system': 0.4,
  'total': 100.0,
  'user': 47.6}, ...]
ports         [OK]    0.00027s 
[]
processcount  [OK]    0.08354s 
{'pid_max': 0, 'running': 1, 'sleeping': 221, 'thread': 1163, 'total': 426}
processlist   [OK]    0.00017s key=pid 
[{'cmdline': ['/home/nhe/bin/idea-IU-232.10203.10/jbr/bin/java', '-classpath',
              '/home/nhe/bin/idea-IU-232.10203.10/lib/platform-loader.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/util-8.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/util.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/app-client.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/util_rt.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/product.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/product-client.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/app.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/lib-client.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/modules.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/lib.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/stats.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/jps-model.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/external-system-rt.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/rd.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/protobuf.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/bouncy-castle.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/forms_rt.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/intellij-test-discovery.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/annotations.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/groovy.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/externalProcess-rt.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/async-profiler.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/byte-buddy-agent.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/error-prone-annotations.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/grpc.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/idea_rt.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/intellij-coverage-agent-1.0.738.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/jsch-agent.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/junit4.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/nio-fs.jar:/home/nhe/bin/idea-IU-232.10203.10/lib/ant/lib/ant.jar',
              '-XX:ErrorFile=/home/nhe/java_error_in_idea_%p.log',
              '-XX:HeapDumpPath=/home/nhe/java_error_in_idea_.hprof', '-Xms128m', '-Xmx2048m',
              '-XX:ReservedCodeCacheSize=512m', '-XX:+UseG1GC', '-XX:SoftRefLRUPolicyMSPerMB=50',
              '-XX:CICompilerCount=2', '-XX:+HeapDumpOnOutOfMemoryError', '-XX:-OmitStackTraceInFastThrow',
              '-XX:+IgnoreUnrecognizedVMOptions',
              '-XX:CompileCommand=exclude,com/intellij/openapi/vfs/impl/FilePartNodeRoot,trieDescend', '-ea',
              '-Dsun.io.useCanonCaches=false', '-Dsun.java2d.metal=true', '-Djbr.catch.SIGABRT=true',
              '-Djdk.http.auth.tunneling.disabledSchemes=""', '-Djdk.attach.allowAttachSelf=true',
              '-Djdk.module.illegalAccess.silent=true', '-Dkotlinx.coroutines.debug=off',
              '-Dsun.tools.attach.tmp.only=true', '-Dawt.lock.fair=true', '-Xmx3945m',
              '-Djb.vmOptionsFile=/home/nhe/.config/JetBrains/IntelliJIdea2023.3/idea64.vmoptions',
              '-Djava.system.class.loader=com.intellij.util.lang.PathClassLoader', '-Didea.vendor.name=JetBrains',
              '-Didea.paths.selector=IntelliJIdea2023.3',
              '-Djna.boot.library.path=/home/nhe/bin/idea-IU-232.10203.10/lib/jna/amd64',
              '-Dpty4j.preferred.native.folder=/home/nhe/bin/idea-IU-232.10203.10/lib/pty4j', '-Djna.nosys=true',
              '-Djna.noclasspath=true',
              '-Dintellij.platform.runtime.repository.path=/home/nhe/bin/idea-IU-232.10203.10/modules/module-descriptors.jar',
              '-Dsplash=true', '-Daether.connector.resumeDownloads=false', '--add-opens=java.base/java.io=ALL-UNNAMED',
              '--add-opens=java.base/java.lang=ALL-UNNAMED', '--add-opens=java.base/java.lang.ref=ALL-UNNAMED',
              '--add-opens=java.base/java.lang.reflect=ALL-UNNAMED', '--add-opens=java.base/java.net=ALL-UNNAMED',
              '--add-opens=java.base/java.nio=ALL-UNNAMED', '--add-opens=java.base/java.nio.charset=ALL-UNNAMED',
              '--add-opens=java.base/java.text=ALL-UNNAMED', '--add-opens=java.base/java.time=ALL-UNNAMED',
              '--add-opens=java.base/java.util=ALL-UNNAMED', '--add-opens=java.base/java.util.concurrent=ALL-UNNAMED',
              '--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED',
              '--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED',
              '--add-opens=java.base/jdk.internal.vm=ALL-UNNAMED', '--add-opens=java.base/sun.nio.ch=ALL-UNNAMED',
              '--add-opens=java.base/sun.nio.fs=ALL-UNNAMED', '--add-opens=java.base/sun.security.ssl=ALL-UNNAMED',
              '--add-opens=java.base/sun.security.util=ALL-UNNAMED', '--add-opens=java.base/sun.net.dns=ALL-UNNAMED',
              '--add-opens=java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED',
              '--add-opens=java.desktop/java.awt=ALL-UNNAMED', '--add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED',
              '--add-opens=java.desktop/java.awt.event=ALL-UNNAMED',
              '--add-opens=java.desktop/java.awt.image=ALL-UNNAMED',
              '--add-opens=java.desktop/java.awt.peer=ALL-UNNAMED',
              '--add-opens=java.desktop/java.awt.font=ALL-UNNAMED', '--add-opens=java.desktop/javax.swing=ALL-UNNAMED',
              '--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED',
              '--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED',
              '--add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED',
              '--add-opens=java.desktop/sun.awt.datatransfer=ALL-UNNAMED',
              '--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED', '--add-opens=java.desktop/sun.awt=ALL-UNNAMED',
              '--add-opens=java.desktop/sun.font=ALL-UNNAMED', '--add-opens=java.desktop/sun.java2d=ALL-UNNAMED',
              '--add-opens=java.desktop/sun.swing=ALL-UNNAMED',
              '--add-opens=java.desktop/com.sun.java.swing=ALL-UNNAMED',
              '--add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED',
              '--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
              '--add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED',
              '--add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED', 'com.intellij.idea.Main'],
  'cpu_percent': 12.5,
  'cpu_times': {'children_system': 286.29, 'children_user': 254.47, 'iowait': 0.0, 'system': 1779.88, 'user': 7964.9},
  'gids': {'effective': 1001, 'real': 1001, 'saved': 1001},
  'io_counters': [0, 0, 0, 0, 0],
  'key': 'pid',
  'memory_info': {'data': 3983003648,
                  'dirty': 0,
                  'lib': 0,
                  'rss': 3364290560,
                  'shared': 172568576,
                  'text': 4096,
                  'vms': 14658424832},
  'memory_percent': 10.168628686090758,
  'name': 'java',
  'nice': 0,
  'num_threads': 146,
  'pid': 63502,
  'status': 'S',
  'time_since_update': 2.3478126525878906,
  'username': '1001'}, ...]
psutilversion [OK]    0.00003s 
'5.9.7'
quicklook     [OK]    0.00036s 
{'cpu': 9.8,
 'cpu_hz': 4500000000.0,
 'cpu_hz_current': 3917685250.0,
 'cpu_name': 'Intel(R) Xeon(R) W-2125 CPU @ 4.00GHz',
 'mem': 21.3,
 'percpu': [{...}, {...}, {...}, {...}, {...}, {...}, {...}, {...}],
 'swap': 12.4}
raid          [OK]    0.00008s 
{}
sensors       [OK]    0.00001s key=label 
[{'critical': 105,
  'key': 'label',
  'label': 'nouveau 0',
  'type': 'temperature_core',
  'unit': 'C',
  'value': 43,
  'warning': 95}, ...]
smart         [OK]    0.04071s 
[]
system        [OK]    0.00001s 
{'hostname': 'pizza-nhe',
 'hr_name': 'Alpine Linux 3.18.4 64bit',
 'linux_distro': 'Alpine Linux 3.18.4',
 'os_name': 'Linux',
 'os_version': '5.14.0-362.13.1.el9_3.x86_64',
 'platform': '64bit'}
uptime        [OK]    0.00016s 
{'seconds': 78701}
version       [OK]    0.00003s 
'4.0.0_beta01'
wifi          [OK]    0.00003s 
[]
===============================================================================
Total time to update all stats: 0.16027s
===============================================================================
@nicolargo
Copy link
Owner Author

Corrected in the develop branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant