热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Varioussegfaultsusinggdbwithcurrentversionofvoltron

When using gdb with voltron (cd11d2f) on Debian 8, gdb will segfault (or crash with other reasons) a

When using gdb with voltron (cd11d2f) on Debian 8, gdb will segfault (or crash with other reasons) after the first few step commands when a voltron view is attached.

Stacktrace and overall problem seems similar to #81.

Issue seems to be independent of debugged program. Basic steps:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# cat test.c

#include

#include



int main() {

        while (1) {

                printf("x\n");

                sleep(1);

        }



        return 0;

}



# gcc test.c -o test

# voltron v reg # somwhere else

# gdb test

GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1

Copyright (C) 2014 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-linux-gnu".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

.

Find the GDB manual and other documentation resources online at:

.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Voltron loaded.

Reading symbols from test...(no debugging symbols found)...done.

(gdb) b main

Breakpoint 1 at 0x40054a

(gdb) r

Starting program: /home/vagrant/dev/vdbg/test



Breakpoint 1, 0x000000000040054a in main ()

(gdb) si

0x000000000040054f in main ()

(gdb)

0x0000000000400410 in puts ()

(gdb)

0x0000000000400416 in puts ()

(gdb)

0x000000000040041b in puts ()

(gdb)

0x0000000000400400 in ?? ()

(gdb)

0x0000000000400406 in ?? ()

(gdb)

_dl_runtime_resolve () at ../sysdeps/x86_64/dl-trampoline.S:34

34      ../sysdeps/x86_64/dl-trampoline.S: No such file or directory.

(gdb)

36      in ../sysdeps/x86_64/dl-trampoline.S

(gdb) /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/cleanups.c:92: internal-error: make_my_cleanup2: Assertion `old_chain != NULL' failed.

A problem internal to GDB has been detected,

further debugging may prove unreliable.

Quit this debugging session? (y or n) [1]    1383 segmentation fault  gdb test


1
2
3
4
5
6
...

(gdb)

_dl_fixup (l=0x7ffff7ffe1a8, reloc_arg=0) at ../elf/dl-runtime.c:66

66      ../elf/dl-runtime.c: No such file or directory.

(gdb)

*** Error in `gdb': double free or corruption (fasttop): 0x00007fbbec013ad0 ***

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# gdb $(which gdb) core -ex bt

GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1

Copyright (C) 2014 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-linux-gnu".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

.

Find the GDB manual and other documentation resources online at:

.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Voltron loaded.

Reading symbols from /usr/bin/gdb...Reading symbols from /usr/lib/debug/.build-id/d5/a96c0efad4fecb3cf1e09d3b2399d14246d773.debug...done.

done.

[New LWP 3093]

[New LWP 3097]

[New LWP 3091]

[New LWP 3109]

[New LWP 3110]

[New LWP 3078]

[New LWP 3092]

[New LWP 3105]

[Thread debugging using libthread_db enabled]

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Core was generated by `gdb test'.

Program terminated with signal SIGABRT, Aborted.

#0  0x00007fbbfbb40067 in __GI_raise (sig=sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

#0  0x00007fbbfbb40067 in __GI_raise (sig=sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

#1  0x00007fbbfbb41448 in __GI_abort () at abort.c:89

#2  0x0000000000655e26 in dump_core () at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/utils.c:635

#3  0x00000000006582d5 in internal_vproblem (problem=problem=0xb81bc0 , file=, line=, fmt=, ap=ap=0x7fbbf617d7a0)

    at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/utils.c:794

#4  0x0000000000658359 in internal_verror (file=, line=, fmt=, ap=ap=0x7fbbf617d7a0) at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/utils.c:820

#5  0x000000000065840f in internal_error (file=file=0x79c148 "/build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/thread.c", line=line=628, string=)

    at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/utils.c:830

#6  0x000000000058ff8c in is_thread_state (ptid=..., state=THREAD_EXITED) at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/thread.c:628

#7  0x000000000065d456 in has_stack_frames () at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/frame.c:1494

#8  0x000000000065dfd9 in deprecated_safe_get_selected_frame () at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/frame.c:1541

#9  0x0000000000653f59 in check_frame_language_change () at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/top.c:355

#10 0x000000000065410e in execute_command (p=, p=0x7fbbec0096d0 "info program", from_tty=from_tty=0) at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/top.c:486

#11 0x000000000065430b in execute_command_to_string (p=p=0x7fbbec0096d0 "info program", from_tty=from_tty=0) at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/top.c:530

#12 0x00000000004e204c in execute_gdb_command (self=, args=, kw=) at /build/gdb-2hEJVN/gdb-7.7.1+dfsg/gdb/python/python.c:559

#13 0x00007fbbfc899da4 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#14 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#15 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#16 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#17 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#18 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#19 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#20 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#21 0x00007fbbfc85b40d in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#22 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#23 0x00007fbbfc896907 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#24 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#25 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#26 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#27 0x00007fbbfc85b40d in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#28 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#29 0x00007fbbfc896907 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#30 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#31 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#32 0x00007fbbfc89927d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#33 0x00007fbbfc89927d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#34 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#35 0x00007fbbfc85b40d in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#36 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#37 0x00007fbbfc896907 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#38 0x00007fbbfc89927d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#39 0x00007fbbfc89927d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#40 0x00007fbbfc89927d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#41 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#42 0x00007fbbfc85b32c in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#43 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#44 0x00007fbbfc8a60e5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#45 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#46 0x00007fbbfc7da335 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#47 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#48 0x00007fbbfc897442 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#49 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#50 0x00007fbbfc85b32c in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#51 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#52 0x00007fbbfc8a60e5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#53 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#54 0x00007fbbfc7da335 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#55 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#56 0x00007fbbfc897442 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#57 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#58 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#59 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#60 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#61 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#62 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#63 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#64 0x00007fbbfc85b32c in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#65 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#66 0x00007fbbfc8a60e5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#67 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#68 0x00007fbbfc897442 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#69 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#70 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#71 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#72 0x00007fbbfc85b32c in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#73 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#74 0x00007fbbfc8a60e5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#75 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#76 0x00007fbbfc7b9d8d in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#77 0x00007fbbfc7dbd2f in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#78 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#79 0x00007fbbfc897442 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#80 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#81 0x00007fbbfc85b32c in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#82 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#83 0x00007fbbfc896907 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#84 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#85 0x00007fbbfc899171 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#86 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#87 0x00007fbbfc85b40d in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#88 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#89 0x00007fbbfc896907 in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#90 0x00007fbbfc89927d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#91 0x00007fbbfc89927d in PyEval_EvalFrameEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#92 0x00007fbbfc90c190 in PyEval_EvalCodeEx () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#93 0x00007fbbfc85b32c in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#94 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#95 0x00007fbbfc8a60e5 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#96 0x00007fbbfc863be3 in PyObject_Call () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#97 0x00007fbbfc90b6e7 in PyEval_CallObjectWithKeywords () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#98 0x00007fbbfc783dc2 in ?? () from /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

#99 0x00007fbbfc50d064 in start_thread (arg=0x7fbbf6182700) at pthread_create.c:309

#100 0x00007fbbfbbf362d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

(gdb)


Issue also occurs with minimal .gdbinit (only containing

1
source /home/vagrant/.local/lib/python2.7/site-packages/voltron/entry.py

)

Gdb version Debian 8:

1
2
3
4
# gdb -v

GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1

# gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))'

2.7

Identical behavior can be observed with gdb + voltron on Ubuntu 16.04:

1
2
3
4
# gdb -v

GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1

# gdb -batch -q --nx -ex 'pi import platform; print(".".join(platform.python_version_tuple()[:2]))'

3.5

After going back to the the latest released voltron version (v1.7) everything seems to be working fine.

A git bisect of the commits after v1.7 returned the following commit introducing the issue:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
vagrant ~/dev/voltron ±42306ff » git bisect good

8691b44c5977d2d3e48231c7a7274c7dfaef367e is the first bad commit

commit 8691b44c5977d2d3e48231c7a7274c7dfaef367e

Author: snare

Date:   Wed Oct 19 22:27:29 2016 +1100



    Convert GDB adaptor to use post_event for magical async



vagrant ~/dev/voltron » git lgl

* 8691b44 (refs/bisect/bad) Convert GDB adaptor to use post_event for magical async (7 months ago)

* 42306ff (refs/bisect/good-42306ffae66c26ed9c6ac608b5fa86984e38a2ec) Yer an idiot, 'arry (7 months ago)

* c0c443c Disabling OS X Travis test until it can be more reliable (7 months ago)

* 31371e9 (refs/bisect/good-31371e9075674568b76465169ba4de357daf1637) Update script to work properly when GDB and LLDB are both installed, and work properly with LLDB on Linux (7 months ago)

* 089bca2 Use install script for testing (7 months ago)

* 776a84c (tag: v0.1.7, refs/bisect/good-776a84cb0eff530f43ed96f0893e957f4cd5fbf1) Version bump (8 months ago)


As a workaround reverting the changes to voltron/plugins/debugger/dbg_gdb.py since v1.7 seems to work fine. (https://github.com/Flowm/voltron/commits/gdb-no-segv)

该提问来源于开源项目:snare/voltron

I tried fiddling around with the original code a bit and I think I found a synchronization issue there.



The decorator

1
is supposed to synchronize access to `gdb` and probably does a decent job at that. It is however not properly used in all instances of access to `gdb` from what I can see. The API of `GDBAdaptor` lists many functions with multiple decorators, most in this particular order (

,




1
,

). Thus, the actions within the outer decorators

1
and

are not synchronized. These functions come from dbg.py and internally call

1
target_is_busy

resp.

1
target_is_valid

, which in turn call

1
self._target

. The

1
_target

function comes from dbg_gdb.py and directly accesses

1
gdb

without the synchronization of the

1
decorator, creating a potential race condition within any GDBAdaptor API function that has

or `` decorators.

For a quick test I changed all occurrences of

1
self._target

within dbg.py to

1
self.target

, which is a wrapper around the internal

1
self._target

plus the synchronization of the `` decorator. It seems to work at least a lot better. I'm not sure if this is a proper fix though, since I can't foresee the impact of this change on other debugger plugins. Maybe someone with more insight into the code can take it from here.


   



推荐阅读
  • docker安装到基本使用
    记录docker概念,安装及入门日常使用Docker安装查看官方文档,在"Debian上安装Docker",其他平台在"这里查 ... [详细]
  • Linux环境变量函数getenv、putenv、setenv和unsetenv详解
    本文详细解释了Linux中的环境变量函数getenv、putenv、setenv和unsetenv的用法和功能。通过使用这些函数,可以获取、设置和删除环境变量的值。同时给出了相应的函数原型、参数说明和返回值。通过示例代码演示了如何使用getenv函数获取环境变量的值,并打印出来。 ... [详细]
  • i3 处理器_旧机型安装 Linux_64位操作系统
    1.确认CPU是否支持64位首先确认CPU为64位cpu,intelcpu应支持EM64T指令集,amdcpu应支持x86-64指令集; ... [详细]
  • 在Docker中,将主机目录挂载到容器中作为volume使用时,常常会遇到文件权限问题。这是因为容器内外的UID不同所导致的。本文介绍了解决这个问题的方法,包括使用gosu和suexec工具以及在Dockerfile中配置volume的权限。通过这些方法,可以避免在使用Docker时出现无写权限的情况。 ... [详细]
  • 本文介绍了使用kotlin实现动画效果的方法,包括上下移动、放大缩小、旋转等功能。通过代码示例演示了如何使用ObjectAnimator和AnimatorSet来实现动画效果,并提供了实现抖动效果的代码。同时还介绍了如何使用translationY和translationX来实现上下和左右移动的效果。最后还提供了一个anim_small.xml文件的代码示例,可以用来实现放大缩小的效果。 ... [详细]
  • 本文介绍了在Linux下安装Perl的步骤,并提供了一个简单的Perl程序示例。同时,还展示了运行该程序的结果。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 本文讨论了在数据库打开和关闭状态下,重新命名或移动数据文件和日志文件的情况。针对性能和维护原因,需要将数据库文件移动到不同的磁盘上或重新分配到新的磁盘上的情况,以及在操作系统级别移动或重命名数据文件但未在数据库层进行重命名导致报错的情况。通过三个方面进行讨论。 ... [详细]
  • Android源码深入理解JNI技术的概述和应用
    本文介绍了Android源码中的JNI技术,包括概述和应用。JNI是Java Native Interface的缩写,是一种技术,可以实现Java程序调用Native语言写的函数,以及Native程序调用Java层的函数。在Android平台上,JNI充当了连接Java世界和Native世界的桥梁。本文通过分析Android源码中的相关文件和位置,深入探讨了JNI技术在Android开发中的重要性和应用场景。 ... [详细]
  • CentOS 7部署KVM虚拟化环境之一架构介绍
    本文介绍了CentOS 7部署KVM虚拟化环境的架构,详细解释了虚拟化技术的概念和原理,包括全虚拟化和半虚拟化。同时介绍了虚拟机的概念和虚拟化软件的作用。 ... [详细]
  • CEPH LIO iSCSI Gateway及其使用参考文档
    本文介绍了CEPH LIO iSCSI Gateway以及使用该网关的参考文档,包括Ceph Block Device、CEPH ISCSI GATEWAY、USING AN ISCSI GATEWAY等。同时提供了多个参考链接,详细介绍了CEPH LIO iSCSI Gateway的配置和使用方法。 ... [详细]
  • PG12新增的VACUUM命令的SKIP_LOCKED选项
    PG12版本的VACUUM命令新增了SKIP_LOCKED选项,该选项使得vacuum命令在遇到被lock住的table时可以跳过并被视为成功执行。之前的版本中,vacuum命令会一直处于等待状态。本文还提到了PostgreSQL 12.1版本的相关信息。 ... [详细]
  • PatchODAX8: ... [详细]
  • systemd-nspawn可以创建最轻量级的容器(ns的意思就是namespace),本文的实验平台是Ubuntu16.04,x86_64机器。本文的目的是:在Ubuntu中用syst ... [详细]
  • 主流操作系统简介
    主流操作系统简介子墨居士操作系统理论定义为管理计算机硬件资源,控制其他程序运行并为用户提供交互操作界面的系统软件的集合。操作系统是计算机系统的关键组成部分࿰ ... [详细]
author-avatar
莫梓智
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有