ITPub博客

首页 > 数据库 > SQL Server > 际上指定101,自动设置blocksize=16384,不需要设定.IFREG|044

际上指定101,自动设置blocksize=16384,不需要设定.IFREG|044

原创 SQL Server 作者:musicqaz 时间:2021-03-04 16:44:36 0 删除 编辑

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.0.1.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<
Attaching to process 59148
ptrace: Operation not permitted.
(gdb) quit

--//上网查了一下,都是报2个gdb进程attach的情况,还有就是有人使用strace.我这种情况不存在.
--//还有一种情况我这里也不存在.链接
https://blog.csdn.net/fjh1997/article/details/101881649
解决gdb调试在WSL环境下报错"ptrace: Operation not permitted"

需要把下列文件里面的变量改成0(原来是1)
echo 0 > /proc/sys/kernel/yama/ptrace_scope
或者
echo kernel.yama.ptrace_scope = 0 > /etc/sysctl.d/10-ptrace.conf #这个是持久化

--//主动使用strace跟踪发现:
87442 open("/proc/26016/status", O_RDONLY) = 7
87442 fstat(7, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
87442 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6ff8db4000
87442 read(7, "Name:\toracle_26016_dy\nUmask:\t002"..., 1024) = 1024
87442 close(7)                          = 0
87442 munmap(0x7f6ff8db4000, 4096)      = 0
87442 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87442 write(2, "ptrace: Operation not permitted.", 32) = 32
87442 write(2, "\n", 1)                 = 1
--//应该是执行到下划线时报错.
$ man rt_sigprocmask
SIGPROCMASK(2)           Linux Programmer's Manual      SIGPROCMASK(2)

NAME
       sigprocmask - examine and change blocked signals


# cat /proc/76821/status  | head
Name:   oracle_76821_dy
Umask:  0022
State:  S (sleeping)
Tgid:   76821
Ngid:   0
Pid:    76821
PPid:   1

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69995498/viewspace-2761192/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2021-03-04

  • 博文量
    13
  • 访问量
    7172