J0mh!) dZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlm Z m!Z!ddl"Z#ddl$Z#ddl%Z%ddl&m'Z'ddl(m)Z*ddl+m,Z,m-Z-e j\j_ddZ0e0d Z1e0d Z2d Z3e j\j_d d Z4dZ5dZ6dZ7dZ8gdZ9dZ:de;de!e;fdZ< d*de;de=dzde=dzde;fdZ> d*de;de=dzde=dzde;fdZ?dZ@ d+deAe;deBe;e;fdzdeCde;fd ZDd!ZEd"ZFd#ZGd$ZHd%ZIGd&d'eBe;e;fZJGd(d)e%jZLy),z;Representation of and data collection for a problem report.N)IterableIterator)kill_pkttyagent)impl)HookUINoninteractiveHookUIAPPORT_DATA_DIRz/usr/share/apportz/general-hooks/z/package-hooks/z/optAPPORT_IGNORE_FILEz~/.apport-ignore.xmlz/etc/apport/report-ignorez/etc/apport/report-onlyz/etc/apport/blacklist.dz/etc/apport/whitelist.d) shbashdashcshtcshzpython*zruby*phpzperl*zmono*awkc tj|tj|D]$}||vs|j |t ||&y#t$rYywxYw)z7Recursively add dependencies of package to depends_set.N) packaging get_version ValueErrorget_dependenciesadd_transitive_dependencies)package depends_setds //usr/lib/python3/dist-packages/apport/report.pyrrVscg& ' ' 05 K  OOA  $Q 45 sA A A  directoryreturnc#K tj|jD]8} |jd5}|D]}|j  ddd:y#1swY xYw#t $rYSwxYw#t $rYywxYww)z?Read every file in the directory and return each stripped line.utf-8encodingN)pathlibPathiterdiropenstripOSError)r list_filefdlines r_read_list_files_in_directoryr,bs   i088: I ^^W^5+ "+"jjl*++ ++      sbB &A>A/A#A/ A>"B #A, (A// A;8A>:A;;A>> B B  B  B pathpiddir_fdcj|tj||Stjd|d|S)zrUse readlink() to resolve link. Return a string representing the path to which the symbolic link points. r//proc//)osreadlink)r-r.r/s r_read_proc_linkr6ps7{{4// ;;uAdV, --c | d|d|}n7tj|tjtjz|}t j|d5}|j j jddcdddS#1swYyxYw#t$r}d t|zcYd}~Sd}~wwxYw) zXRead file content. Return its content, or return a textual error if it failed. Nr2r3r1rbUTF-8replaceerrorsError: ) r4r&O_RDONLY O_CLOEXECioreadr'decoder(str)r-r.r/ proc_filer*errors r_read_proc_filerG}s & >%+C5$#8IbkkBLL&@PI WWY % G779??$++GI+F G G G &3u:%%&s<AB/B BBBB C( B;5C;Ccd} tdfdd5}|jj}ddd|S#1swY|SxYw#t$r}dt |zcYd}~Sd}~wwxYw)zRead /proc/pid/maps. Since /proc/$pid/maps may become unreadable unless we are ptracing the process, detect this, and attempt to attach/detach. z%Error: unable to read /proc maps filemapsc4tj||S)Nr1)r4r&)r-mode proc_pid_fds rz_read_maps..sbggdD&Mr7r )openerr"Nr>)r&rBr'r(rD)rLrIr*rFs` r _read_mapsrOsu 3D&  M  %779??$D  % K % K &3u:%%&s7A ?A A A A A- A("A-(A-commandenvtimeoutc B tj|dd|dtjtj|}|jd k(r|j jStd|d |jd|j j#tj$rq}|j r,d|j j j}nd}tdt|jd|jd ||d }~wwxYw) zRun command and capture its output. Try to execute given command (argv list) and return its stdout, or return a textual error if it failed. Fr:r;)checkr"rQr=stdoutstderrrR: z with no stdoutzError: command z timed out after z secondsNrz failed with exit code ) subprocessrunPIPESTDOUTTimeoutExpiredrUrCrstripr(rDcmdrR returncode)rPrQrRsprFoutputs r_command_outputrbs^^ ??$$  & }}yy!!  '"9"--I II     !   $ $ <<%,,--/6689:F&Fc%))n-.mm_HVH 6   s9BD-A,DDcd|jvry|jD]i}|jtjj j k(s6|jdk(sF |jdj}||vry|j|js|jdjtjj jk(s|jdj}||}t|tjr"|j!}|j#d}n!t|t$r|j#d} t'j(|}|j1|rjy|jdjS#t$rYwxYw#t&j*t,t.f$rYwxYw)zxCheck if given report matches the given bug pattern XML DOM node. Return the bug URL on match, otherwise None. urlNrekeyrr:) attributes childNodesnodeTypexmldomNode ELEMENT_NODEnodeName nodeValueKeyError normalize hasChildNodes TEXT_NODE isinstanceproblem_reportCompressedValue get_valueencodebytesrecompilerF TypeErrorrsearch)reportpatterncrfregexpvre_cs r_check_bug_patternrsv  G&&&     ::22 2qzzT7I ll5)33&  KKM Q\\!_%=%=AWAW%Wa223Ka!?!?@ A#]]73F5)#]]73F::f-D{{1~/ 2   e $ . ..)  )Z8s$#F"F2" F/.F/2GGc tjjj|}|jdD]}t||}|s|cSy#tjj j tf$rYywxYw)Nr~) rjrkminidom parseStringparsersexpat ExpatErrorUnicodeEncodeErrorgetElementsByTagNamer)r}patternsrkr~rds r_check_bug_patternsrs~ggoo))(3++I6 1 J  KK   ( (*< =s)A-BBc|jD]}}|jtjjj k(r?|j jdk(r"|j|j|st|y)z6Recursively remove whitespace from given XML DOM node.N) rhrirjrkrlrsror'unlink removeChild_dom_remove_space)noders rrrsb __! ::// /AKK4E4E4G24M HHJ   Q  a !r7ctjj|syi} t|d5}t t |j |d|ddd |d||y#1swYxYw#t$r1}t|jdr |d|nYd}~yd}~wwxYw#t$rYyt$rtjjtjj|djd d }tj |d |z<t"j$j'd |tj(YywxYw) NFr r!execadd_infoz add_info()Tr-_ HookError_zhook %s crashed:)r4r-existsr&rrzrBr{rD startswith StopIteration Exceptionsplitextbasenamer; traceback format_excapportloggingrF print_exc)r}uihooksymbr*rFhooknames r _run_hookrsA 77>>$  D $ ) 9R D&14 8 9  D VR ( ) 9 9  5z$$\2!Z ()    77##BGG$4$4T$:;A>FFsCP*3*>*>*@|h&'/6  sS B6&A-B6 A9-A62B69 B3'B.)B6.B33B66 E)B%E)(E)cd}|r?tjj|tjj ddg}t j ||S)z.Return path of command, preferring extra_path.NPATHr)r-)r4pathsepjoinenvirongetshutilwhich)rP extra_pathr-s r_which_extrapathr#sA Dzz BJJNN62,FGH <<d ++r7c>eZdZdZddZdeeddfdZedZ y) _Environmentz)Wrapper around an environment dictionary.rNcd|jd}|y|dk(r|d=yd|vsd|vrd|d<yd|d<y)z/Anonymize PATH environment variable if present.rNzG/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/gamesz/homez/tmpz(custom, user)z(custom, no user))r)selfr-s ranonymize_pathz_Environment.anonymize_path/sMxx <  8 8V _$+DL.DLr7keysc&|D] }||vsd||<y)z1Anonymize given environment variables if present.zN)rrrfs ranonymize_varsz_Environment.anonymize_vars>s! $Cd{#S  $r7c ||jdDcgc]}d|vs|jddc}Scc}w)zRead environment variables from text representation. The environment variables are expected to be separated by newlines.  =)split)clsrentrys r from_stringz_Environment.from_stringDs< .5mmD.A RUSE\U[[a R  Rs ;;rN) __name__ __module__ __qualname____doc__rrrDr classmethodrrr7rrr,s53 /$8C=$T$   r7rc eZdZdZdAdededzddfdZededefdZdededzfd Zdedefd Z dBdedzddfd Z d Z d eddfdZ dCdZ dCdZdCdZdedzfdZedededzfdZ dDdeezdzdedzdeedzddfdZdCdZ dDdedzdeedzdedzddfdZ dBdedeedzddfdZdefdZ dEdedzdedzddfd Zd!Z dDd"edzdedzd#edzdefd$Zd"ededzd#edzdefd%Zd&edzdedzfd'Z ed(Z!defd)Z"defd*Z#dCd+Z$defd,Z%dedzfd-Z&dedzfd.Z'dedzfd/Z(dedzfd0Z)de*efd1Z+dedzfd2Z,ed3ededzfd4Z-dedzfd5Z.dCd6Z/ dBd7edzdedzde0e*ee1eefffd8Z2d9Z3dCd:Z4d;e1ee5fdZ6d;e1ee5fddfd?Z7e8d@Z9y)FReportzA problem report specific to apport (crash or bug). This class wraps a standard ProblemReport and adds methods for collecting standard debugging data. N problem_typedatercbtjj|||d|_d|_y)a,Initialize a fresh problem report. date is the desired date/time string; if None (default), the current local time is used. If the report is attached to a process ID, this should be set in self.pid, so that e. g. hooks can use it to collect additional data. N)ru ProblemReport__init__r._proc_maps_cache)rrrs rrzReport.__init__[s+ $$--dL$G#CGr7rcd}tj|}|r|ddj|dz } tj|s'tj|}|r |d|dz }|S|dz }|S#t $rY|SwxYw)zReturn a string suitable for appending to Package/Dependencies. If package has only unmodified files, return the empty string. If not, return ' [modified: ...]' with a list of modified files. rz [modified:  ]z [origin: z [origin: unknown])rget_modified_filesris_distro_packageget_package_originr)rsuffixmodorigins r_customized_package_suffixz!Report._customized_package_suffixhs**73   SXXc]O15 5F ..w7"55g> 6(!44F 22F      s5A1*A11 A>=A>c tj|}|d|xsd|j||d<|S#t$rd}Y.wxYw)a Add Package: field. Determine the version of the given package (uses "(not installed") for uninstalled packages) and add Package: field to report. This also checks for any modified files. Return determined package version (None for uninstalled). Nrz(not installed)Package)rrrrrrversions r add_packagezReport.add_packagesg ++G4G iq5$56..w78 : Y  G s8 AAct}t||d}t|D]:} tj|}|r|dz }||d||j |z }<|S#t $rYJwxYw)Nrrr)setrsortedrrrr)rrdependencies_set dependenciesdeprs r_get_transitive_dependenciesz#Report._get_transitive_dependenciess%(U *:; *+ OC ))#. $ se1QC(G(G(L'MN NL O  sA## A/.A/cd|s7d|vr|ddk(r|d}n"tjj|d}|sy|j|}|sd|vr t j ||d<|syd|vrt j||d<d|vr|j||d<yy#t $rYDwxYw) aAdd packaging information. If package is not given, the report must have ExecutablePath. This adds: - Package: package name and installed version - SourcePackage: source package name (if possible to determine) - PackageArchitecture: processor architecture this package was built for - Dependencies: package names and versions of all dependencies and pre-dependencies; this also checks if the files are unmodified and appends a list of all modified files ExecutablePath ProblemType KernelCrashrN SourcePackagePackageArchitecture Dependencies) r fileutilsfind_file_packagerr get_sourcerget_architecturerrs radd_package_infozReport.add_package_infost+]0C}0Ty/ **<t|dk\r0|j|d }|r|d|d<||d<yd|d |d<y|d=t|d k\r|djd r}t|d k\r|djdr-d|vr)tjj|d|d|d<tj|dtjr-|d|d<tjj|d|d<d|vr| k7r|D]}tj||dztjs.||dz} tjjtjj| |k(r |d|d<| |d<nd|vrLtjj|ddk(r&|d|d<|j!} | r| |d<yd|d<yyy#t$rYnwxYw)zCheck if process is a script. Use ExecutablePath, ProcStatus and ProcCmdline to determine if process is an interpreted script. If so, set InterpreterPath accordingly. rNc0tj|SN)fnmatch)i exebasenames rrMz+Report._check_interpreted..OsGOOK$Cr7 ProcStatus rzName: ProcCmdline)z /usr/bin/z /usr/sbin/z/bin/z/sbin/rrpythonz-mInterpreterPathz'Cannot determine path of python module UnreportableReason.ProcCwdrtwistdz&Cannot determine twistd client program)r4r-ranyfilter interpreters splitlinesrrlenr_python_module_pathraccessR_OKrealpath_twistd_executable) rrr+krcmdargsbindirsr-rargvexeexer>s @r_check_interpretedzReport._check_interpreted>s 4 ' gg&&t,<'=> 6C\RS &113 D D!,AG|  }%++D1@'laGAJ$9$9#$>x(WQZ4-?CLTUDU// ;.23C.DD*+-1D)* B'!*N-. 'laGAJ$9$9#$> w<1 qz$$S)i4.?WW\\$y/71:F yyRWW-*./?*@&')+)9)9'!*)E%& D (T[-@ 99Q^RWW5'!*nGww''(8(8(ABdJ267G2H./18-.    %  &6!78HD&*+;&>++F3D <{{   s 0 <<r.rLextraenvct|tr t|}|s|s"|jxst j }|js||_ t j d|tjtjztjz} td|||d<|j!|||t#d|||d <t#d ||j%d |d <t'||d <d|vr td|||d<dD]3}|dj)d|ds|dt+d|d|d<ntj,j/|dst|dd|j1|j3|d j5ddj5ddj5d d|d < t j6dk(rt#d||}|dk7r||d<yyy#t$r}td|d}~wt$r/}|jtjk(r td|d}~wwxYw#t$rYwxYw#t$r}td|d}~wt$r/}|jtjk(r td|d}~wwxYw#t$rYywxYw)aAdd /proc/pid information. If neither pid nor self.pid are given, it defaults to the process' current pid and sets self.pid. This adds the following fields: - ExecutablePath: /proc/pid/exe contents; if the crashed process is interpreted, this contains the script path instead - InterpreterPath: /proc/pid/exe contents if the crashed process is interpreted; otherwise this key does not exist - ExecutableTimestamp: time stamp of ExecutablePath, for comparing at report time - ProcEnviron: A subset of the process' environment (only some standard variables that do not disclose potentially sensitive information, plus the ones mentioned in extraenv) - ProcCmdline: /proc/pid/cmdline contents - ProcStatus: /proc/pid/status contents - ProcMaps: /proc/pid/maps contents - ProcAttrCurrent: /proc/pid/attr/current contents, if not "unconfined" - CurrentDesktop: Value of $XDG_CURRENT_DESKTOP, if present r2znot accessibleNzinvalid processcwdrH)r.rLrhstatusr?cmdlinerBrAProcMapsrrX)rofsrwfs squashmnt persistmntr3z does not exist\z\\rz\ rz attr/current unconfinedProcAttrCurrent)rtrDintr.r4getpidr&r?O_PATH O_DIRECTORYPermissionErrorrr(errnoENOENTr6add_proc_environrGr]rOrrNr-rrY_add_executable_timestampr;getuid)rr.rLrhrFrvals r add_proc_infozReport.add_proc_infos: c3 c(Chh-"))+88  ggSENBKK"))$;bnn$L  -eS+FDO #;R,XsKH\-ikJQQRVW]%k2Z 4 ' )8[)Q%&= A$%001QCq:)-.>)?asG )O%& ww~~d#345%5 67GH H ! &&(   WT6 " WS% WT3  ] yy{a%nc;G,&.1D*+' c# > !12= ;;%,,.$%67UB    # > !12= ;;%,,.$%67UB B   smA H II..K I H  I,*II I+*I+. J>7 J J>*J99J> K  K crtttj|dj|d<y)NrExecutableTimestamp)rDrur4statst_mtime)rs rr}z Report._add_executable_timestamps,&)#bggd;K6L.M.V.V*W&X "#r7cx|s_|stj}tjd|tjtjztj z} t tjj|}|j||y#t$r}d||d<Yd}~yd}~wwxYw)aAdd environment information. If pid is not given, it defaults to the process' current pid. This adds the following fields: - ProcEnviron: A subset of the process' environment (only some standard variables that do not disclose potentially sensitive information, plus the ones mentioned in extraenv) - CurrentDesktop: Value of $XDG_CURRENT_DESKTOP, if present r2r> ProcEnvironN) r4rvr&r?rwrxrrrget_process_environr( _add_environ)rr.rhrLrrFs rr|zReport.add_proc_environs iik'' bii 7".. HK "6#3#3#G#G #TUG '8, $+E7"3D   s#(B B9'B44B9rc Phd}|hdz}|r|t|z}|j|j|d|vr|d|d<djt |j Dcgc]!\}}||vr|d|j ddz#c}}|d<ycc}}w) N> LD_PRELOADLD_LIBRARY_PATHXDG_RUNTIME_DIR>LANGrTERMSHELLLC_NAMELC_TIMELOCPATHLANGUAGELC_CTYPELC_PAPER LC_ADDRESS LC_COLLATE LC_NUMERIC LC_MESSAGES LC_MONETARY LC_TELEPHONELC_MEASUREMENTLC_IDENTIFICATIONXDG_CURRENT_DESKTOPCurrentDesktoprr\nr)rrrrritemsr;)rrrhr safe_varsrfvalues rrzReport._add_environ6sN"&  (  X &I ~. G +%,-B%CD! ""ii#)"9 C)#%q EMM$66  ] s0&B" cfd|vryd}d} t|ddrGtj\}}tj||dtj |d}|dj d}dd|g} tj|dd tjtj }|jd k(}|r|j|d <|rtj||S#t$rY|rtj|yywxYw#|rtjwwxYw) zWAdd information from kernel crash. This needs a VmCore in the Report. VmCoreFfindTr rcrashz/usr/lib/debug/boot/vmlinux-sbt -a -f ps runq quit )rTinputrUrVr Stacktrace)hasattrtempfilemkstempr4writecloserrXrYrZr[r(rr_rU)r unlink_coreretr*corekverrPrs radd_kernel_crash_infozReport.add_kernel_crash_info^s, 4   tH~v.%--/ TT(^, " =&&(+D">tf EtLG "7%??%,, ""a'C%*\\\" $    $  $s0A4D6C/6 D/ D8DDDD0rootdir gdb_sandboxcd|vsd|vrydddddd d d }|j||\}}d |d <|gdz }g}|jD]\}}|j||ddd|gz }!|jd|ddgz }t||} d| vsd| vrd| vr3dj | j D cgc] } d| vs|  c} } nJd| vr3dj | j D cgc] } d| vs|  c} } n| j d} d| j z} | |d<t| | jddd} | jdrmsgzprint __glib_assert_msgzprint (char*) __nih_abort_msg) Registers DisassemblyrThreadStacktraceAssertionMessageGLibAssertionMessageNihAssertionMessagez /nonexistentHOME)z--batch--exzset backtrace limit 2000z-iexzset debuginfod enable offrzp -99 separator)rQz%is truncated: expected core file sizezis not a core dumpzwarning:rzWarning:rzInvalid core dump: rFr)maxsplitzNo such file or directory.z&executable file for coredump not foundz^\$\d+\s*=\s*-99$z z . rz"ERROR:rr$z(^\$\d+\s+=\s+0x[0-9a-fA-F]+\s+"(.*)"\s*$rrStacktraceAddressSignature) gdb_commandrrrbrrMr'r(rendswithFileNotFoundErrorrzr{r4strerrorrerz MULTILINEr]r;rmatchr_gen_stacktrace_topcrash_signature_addresses)rrr gdb_reportsgdb_cmdr value_keysrr^outr+warningsreason first_linepart_repartspartraddr_signatures r add_gdb_infozReport.add_gdb_infos\6 T !%5T%A *&# : 8$=#B  ++G[A(   $**, 6ID#   d # 5 5G 6 +&FG$$g73 4s :#s*S 99&)nn&6Md*:LTMs"99&)nn&6Md*:LTM>>+A.*X^^-==F)/D% &&/ !YYtaY03   ; <#  ELL)8 **12<<@ c" !  LD&*ll67&C&I&I&KD" # L "T )D!788+/0F+G'(+, !D ()*55c:+/0E+F'(*+  %;TBT=UA+,771:'(*+44U;/34F/G"/MD+,+, 4   $ $ &!;;=N5C12 mNNs7 KK. K8Kctgd}dgdz}d}d}d}d}tjd}tjd}tjd} |d jD]0} |j | } | s|j | } | s+|r|r| j d r5| j d j dj d d} nd } |r| jd s| dvrd}| j ds| |vr%d}d}dgdz}| j drd}| dk(rd}d}| j d xs| j d} | j d}|t|ks| j |r'| ||<|dz }3dj|j|d<y )zBuild field StacktraceTop as the top five functions of Stacktrace. Signal handler invocations and related functions are skipped since they are generally not useful for triaging and duplicate detection. )g_logvg_log IA__g_log IA__g_logvg_assert_warningIA__g_assert_warning __GI_abort_XErrorrrFzD^#(\d+)\s+(?:0x(?:\w+)\s+in\s+\*?(.*)|()\s*)$z0^#(\d+)\s+(?:(.*)|()\s*)$z,^(__.*_s?sse\d+(?:_\w+)?|__kernel_vsyscall)$rr(N_X> XWindowEvent handle_errorhandle_responserDTrrr StacktraceTop) rrerzrMrrrrrNrr')runwind_functionstoptracedepthunwound unwindingunwinding_xerrorbt_fn_rebt_fn_noaddr_reignore_functions_rer+rfnframefunctions rrzReport._gen_stacktrace_tops    4!8  :: S ** ? !jj ; &113* Dt$A#))$/i771:))+A.44S9!.py or in GENERAL_HOOK_DIR/*.py and has to contain a function 'add_info(report, ui)' that takes and modifies a Report, and gets an UserInterface reference for interactivity. return True if the hook requested to stop the report filing process, False otherwise. N _HooksRun)r_add_hooks_infor]r)rrrrrs radd_hooks_infozReport.add_hooks_infoQs> :%'B""2w ; d# r7c |s|jd}|r |jd}d|vr d||d<y|s|jd}|r |jd}d|vr d||d<ytg}d}tjj |jd d }|j tr|}n`|r^ tjj|D];}|j tstjj|s9|}n|rt|ttk\rl|jtjj|d d d tjj!|}t|ttk\rlt#t%j$t&dzD]}t)|||sy|r7|D]2} t)||tjj| |dzs2y|r8|D]3} t)||tjj| d|ds3yy#t$rYBwxYw)Nrrr3zinvalid Package: rFFrzinvalid SourcePackage: rrsharerz package-hooksz/*.pyTz.pysource_)rrPACKAGE_HOOK_DIRr4r-rRr_opt_dirrr get_filesisfilerrNrrdirnamerglobGENERAL_HOOK_DIRr) rrrr hook_dirsopt_path exec_pathr rhook_dirs rrzReport._add_hooks_infohs5hhy)G mmoa(Gg~/@ -J)*/2J #))+A.Jj /Fzl-S)*%& GG$$TXX.>%CD    ) H  ))33G<A||H-"''..2C#$ h-3x=0  GGLL7HoN77??84 h-3x=0499%5%?@A Dr4(  % T2rww||Hgo'NO % "bggll8wzl#5NO  =  s>7I6II IIrdc2|sy tjj|5}|jj dd}ddddvryt||}|r|Sy#1swYxYw#t tj jf$rYywxYw)aCheck bug patterns loaded from the specified url. Return bug URL on match, or None otherwise. The url must refer to a valid XML document with the following syntax: root element := patterns := * pattern := regular expression* + For example: ba.*r ^\\S* 1-2$ write_(hello|goodbye) Nr:r;r<z404 Not Found) r��requesturlopenrB���rC���r(���rF���URLErrorr���)r���rd���r ��r���s��� r���search_bug_patternszReport.search_bug_patterns��s����0� '',� L"<<>000K L � "X -!$1 J L� L../�  s(���A0�"A$A0�$A-)A0�0#BBc������������������>���t��������j������������������t��������j�������������������������������d���}�t��������j ������������������d|�������}d}d}d} �t��������j ������������������|t��������j������������������t��������j������������������z��������}t��������j������������������|������}t��������j������������������|j������������������������r't��������j������������������|d������}|j������������������d������}||j!��������������������������n|t��������j ������������������|������� �|dk(��r0t"��������j$������������������j'�������������������������j)������������������ddd������}n* �t"��������j$������������������j*������������������j-������������������|������}|j8������������������j;��������������������������t=��������|j8�������������������������|S�#�t��������$�r�Y�w�xY�w#�||j!��������������������������w�|t��������j ������������������|�������w�w�xY�w#�t"��������j.������������������j0������������������j2������������������$�r#}t5��������t���������dt7��������|�������������|d}~ww�xY�w) zRead ignore list XML file and return a DOM tree. Return an empty DOM tree if file does not exist. Raises ValueError if the file exists but is invalid XML. r��~r���NriP��r���z has invalid format: )r,��r-��r4���r.�� _ignore_filer;���r&��� O_NOFOLLOWr?���fstatr��S_ISREGst_modefdopenrB���r(���r��rj���rk���getDOMImplementationcreateDocumentr���r���r���r���r���r���rD���documentElementrq���r���)homedirifpathcontentsr*���r ��strk���rF���s��� r���_get_ignore_domzReport._get_ignore_dom��s����,,rzz|,Q/%%c73   !<=B"B||BJJ'IIb#&66%=�}  r>''..0??hPTUC ggoo11(;� %%'#--. 1��   �}  � �;;$$//�  #n$9#e*F s=���BF�9)G� FF"�FF"�"-G'H9HHc���������������������t��������|�d���������}|�j������������������d������}|r|S� �t��������j������������������|������j������������������S�#�t ��������$�r�d|�cY�S�w�xY�w)NSignal SignalNamezsignal )ru��r���signalSignalsr���r���)r��� signal_number signal_names��� r���_get_signal_namezReport._get_signal_name��s]����DN+ hh|,   ->>-055 5� -]O, , -s���A�AAc��������������������d|�v�sJ�|�d���t��������t��������������v�s|�d���t��������t��������������v�ryt��������t��������t��������������������}|t��������t��������t ��������������������z��}|r|�d���|vry �|�j �������������������������} �t��������t��������j ������������������|�d���������j"������������������������} �|j'������������������d������D�]9��}|j)������������������d������|�d���k(��st+��������|j)������������������d������������|k\��s9�y� �y#�t��������t��������f$�r6�t��������j������������������j������������������d�������t��������j��������������������������Y�yw�xY�w#�t$��������$�r�Y�yw�xY�w#�t��������t��������f$�r�Y�yw�xY�w)a^��Check if current report should not be presented. Reports can be suppressed by per-user denylisting in ~/.apport-ignore.xml (in the real UID's home) and /etc/apport/report-ignore/. For environments where you are only interested in crashes of some programs, you can also create an allowlist in /etc/apport/report-only/, everything which does not match gets ignored then. This requires the ExecutablePath attribute. Throws a ValueError if the file has an invalid format. Privileges may need to be dropped before calling this. r���TzCould not get ignore file:Fignoreprogrammtime)r,��� _DENYLIST_DIR_LEGACY_DENYLIST_DIRr���_ALLOWLIST_DIR_LEGACY_ALLOWLIST_DIRr��r���rp���r���r���rF���r���r���ru��r4���r��r��r(���r��� getAttributefloat)r��� allowlistrk��� cur_mtimer'��s��� r��� check_ignoredzReport.check_ignored��s{���� 4'''�  !%B & � " #'D ( � ��5nEF S67LMNN ./y@ &&(C  BGGD)9$:;DDEI  228<� $&&y1T:J5KKV009:iG# $�)�H%�  NN != >    ! ��  �H%�   sI���.C:�?+E�++E�E�5E�7E�:AD?>D? E EE#"E#c�����������������8���d|�v�sJ�|�j�������������������������} �t��������t��������t��������j������������������|�d���������j ������������������������������}|j������������������d������D�]-��}|j������������������d������|�d���k(��s|j������������������d|��������nT�|j������������������d������}|j������������������d|�d����������|j������������������d|�������|j������������������j������������������|�������t��������j ������������������t��������j"�������������������������������d���}t$��������j'������������������d|������}t)��������|dd ������5�}|j+������������������|d d �������ddd�������|j-��������������������������y#�t ��������$�r(}|j������������������t��������j������������������k(��rY�d}~y�d}~ww�xY�w#�1�sw�Y���NxY�w)a~��Ignore future crashes of this executable. Add a ignore list entry for this report to ~/.apport-ignore.xml, so that future reports for this ExecutablePath are not presented to the user any more. Throws a ValueError if the file already exists and has an invalid format. Privileges may need to be dropped before calling this. r���Nr'��r(��r)��r��r��wr ���r!���z r���) addindentnewl)r��rD���ru��r4���r��r��r(���rz��r{��r���r.�� setAttribute createElementr�� appendChildr,��r-��r.��r��r;���r&���writexmlr���) r���rk���r)��rF���r'��er��ignore_file_pathr*���s ��� r��� mark_ignorezReport.mark_ignoreI��sp���� 4'''""$ BGGD)9$:;DDEFE�..x8� /F""9-6F1GG##GU3 / �!!(+A NN9d+;&< = NN7E *    + +A .�,,rzz|,Q/'//W= "C' :� 8b LLt$L 7 8� 5�� {{ell*   . 8� 8s)���4E�.F F %FFF Fc��������������������|�j������������������d������sy|�d���j�������������������������D�cg�c]��}|j������������������d�������}}t��������|������dk��r|j ������������������d������dk(��S�|j ������������������d������t��������|������dz ��k��S�c�c}w�)a��Check whether StackTrace can be considered 'useful'. The current heuristic is to consider it useless if it either is shorter than three lines and has any unknown function, or for longer traces, a minority of known functions. r��F??rD��Tr���g�������@)r���rM��r���rN��count)r���r �� unknown_fns��� r���has_useful_stacktracezReport.has_useful_stacktracev��s�����xx(262G2R2R2TUQall4(U U z?Q ##D)Q. .%Z3)>>> �Vs���Bc���������������������|�j������������������dd������j�������������������������D�]-��}|j������������������d������d���j�������������������������}|dk7��s+|c�S��y)z)Return topmost function in StacktraceTop.r��r���r��r���r?��N)r���rM��r���r'���)r���r+���fnames��� r���stacktrace_top_functionzReport.stacktrace_top_function��sQ����HH_b1<<>� DJJsOA&,,.E}   �r7���c��������������������|�d���j�������������������������}t��������|������dk��ry�t��������|������dk��r*t��������j������������������j ������������������|�d����������d|d����S�t ��������j ������������������d������}t��������|������dz ��}d}|dk\��rD|j������������������||���������}|r#|j������������������d������}|j������������������d ������}n |dz��}|dk\��rDt��������j������������������j ������������������|�d���������}|d ���}|j������������������d ������d���} t ��������j������������������d t ��������j������������������| �������d |������}|r|j������������������d������} nd�} |dk(��r|�d���k(��rd} n|} n|�d} |�d| �d| �} | r| d| �z ��} | S�)N Tracebackr���rD��r��� crashed with r���z^\s*File\s*"(\S+)".* in (.+)$r���r��:^z: (.+)$<module>__main__() in rW���) rM��rN��r4���r-���r���re���rz���r��r��r���escape) r���tracetrace_rer=��r��r�� module_pathr-��� last_line exceptionmessagecontexttitles ��� r���_get_python_exception_titlez"Report._get_python_exception_title��s���[!,,. u:> u:>77##D)9$:;< q ,  �::>? JN1fuQx(Aggaj 771: FA �1f�ww%5 67"I OOC(+ HHq9-.g6 B ggajGG z !d#344$�&! "oG&ykgY?  r'^ #E r7���c���������������������|�j�������������������������}|rd|�d}nd}d}d|�v�r d|�v�r|�d���|�d���k7��r|�d���dk7��r d|�d����d}t��������j������������������j������������������|�d ����������d |�j ��������������������������|�|�S�) NrO��rN��r���r"��r���allz [non-native z package]r���rH��)rE��r4���r-���r���r%��)r���r�� arch_mismatchs��� r���_get_signal_crash_titlezReport._get_signal_crash_title��s����  ) ) + t2BB d "%-^$-B(CC*+u4+D1F,G+H RM�ww%5 678T2245bT- J r7���c��������������������|�j������������������d������dk(��r2d|�v�r.d|�v�r*t��������j������������������j������������������|�d����������d|�d����S�d|�v�rd|�v�rd|�v�r|�j �������������������������S�d|�v�rd|�v�r|�j �������������������������S�|�j������������������d������d k(��r<d |�v�r8d |�d ����d }|�j������������������d ������r|d |�d ���j �������������������������d���z���z ��}|S�|�j������������������d������dk(��rHd|�v�rD|�d���}|j������������������d������r|j������������������dd������d���}|S�|j������������������dd������d���}|S�|�j������������������d������dk(��r<d|�v�r8d}d|�v�r|d|�d���z���dz���z ��}||�d���dz���z ��}d|�v�r|d|�d���z���dz���z ��}|dz ��}|S�y) aZ��Create an appropriate title for a crash database entry. This contains the topmost function name from the stack trace and the signal (for signal crashes) or the Python exception (for unhandled Python exceptions). Return None if the report is not a crash or a default title could not be generated. r��6r���r��z assert failure: r��rG��r���r���zpackage z failed to install/upgrade ErrorMessagerW���rI�� KernelOopsOopsTextz$------------[ cut here ]------------r���r��r���r���Failurer��� MachineType[z] z failureNonfreeKernelModulesz [non-free: r���N) r���r4���r-���r���r]��rY��rM��r���r���)r���rX��oopss��� r���standard_titlezReport.standard_title��s���� HHX # % D("d*�77##D)9$:;<�=+,-/  � t  0D 8_PT=T//1 1 $ #3t#;335 5� 88M "i /I4EtI//IJExx'^ 4 ? ? A" EEEL 88M "l 2zT7I #DEF 4+A.�L� 4+A.L 88M "l 2yD7H�E$tM22T99 T)_z1 1E%-$/E*FFLL TMELr7���c�����������������J���g�}|�j������������������dd������dz���|�j������������������dd������z���j�������������������������D�]g��}|s|j�������������������������dd�\��}}t��������j������������������|������}|4|dk7��s:|=t��������j ������������������||������dk��sW|j ������������������|�������i�|S�) z=Return list of obsolete packages in Package and Dependencies.r���r���r���r���Nr��Noner���)r���rM��r���r���get_available_versioncompare_versionsr��)r���obsoleter+���pkgveravails��� r���obsolete_packageszReport.obsolete_packages��s���� HHY #d *TXXnb-I I *, %D�zz|BQ'HC33C8E6M%..sE:Q>$ %�r7���c�����������������D���d|�vr|�d���dvryd|�v�rd|�d���dk(��r\d}t��������j������������������d������}|�d���j�������������������������D�]-��}|j������������������|������}|s|d |j ������������������d ������z���z ��}/�|S�|�j ������������������d ������d k(��r)d |�v�r%|�d���d z���|�d ���z���}t��������j ������������������dd|������S�d|�v�rd |�v�r|�d����d |�d ����}t��������j������������������d������}|�d���j�������������������������}t��������|������dk��ry|D�]A��}|j������������������|������}|r+|d |j ������������������d ������xs�|j ������������������d������z���z ��}A�y�|S�d|�v�r_|�d���j�������������������������}d}t��������|������d k(��r6t��������j������������������d|d���������}|sy|�d���d z���|j ������������������d ������z���S�t��������|������dk��ryt��������j������������������d������}|D�]��}|j������������������|������}|s|j ������������������d������dk7��r|d |j ������������������d������z���z ��}C|j ������������������d ������} t��������j������������������j������������������| ������rt��������j������������������j������������������| ������} |d | �d|j ������������������d�������z ��}�|d���j������������������d ������d���} �| d|�d����dz ��} |�d���d z���| z���|z���S�|�d���dk(��rQd |�v�rMd!|�d ���v�sd"|�d ���v�r?|�d ���}|�j ������������������d#������r |d |�d#����z ��}|�j ������������������d$������r |d |�d$����z ��}|S�d%|�v�r d&} g�} |�d%���j������������������d'������D�]��}|j������������������d(������rFt��������j������������������d)|������} | r.| j ������������������d ������}|s J�d*|��������| j!������������������|�������|j������������������d+������r&|�j#������������������|������}|s| j!������������������|�������|j������������������d,������rd-} | sd}|r.|d���d.k(��r&|�j#������������������|������}|s| j!������������������|�������d&} �| rd j%������������������| ������S�y#�t��������$�r�Y�w�xY�w)/a��Get a signature string for a crash. This is suitable for identifying duplicates. For signal crashes this the concatenation of ExecutablePath, Signal number, and StacktraceTop function names, separated by a colon. If StacktraceTop has unknown functions or the report lacks any of those fields, return None. In this case, you can use crash_signature_addresses() to get a less precise duplicate signature based on addresses instead of symbol names. For assertion failures, it is the concatenation of ExecutablePath and assertion message, separated by colons. For Python crashes, this concatenates the ExecutablePath, exception name, and Traceback function names, again separated by a colon. For suspend/resume failures, this concatenates whether it was a suspend or resume failure with the hardware identifier and the BIOS version, if it exists. r���r���>���ra��r���Nr��r���kernelz^\s*\#\d+\s\[\w+\]\s(\w+)rJ��r���r��r_��r��z0x[0-9a-f]{6,}ADDRr��z.^(?:([\w:~]+).*|(<signal handler called>)\s*)$r��rG��r���z(\w+): r���rD��z)^\s+File "([^"]+).*line (\d+).*\sin (.*)$rL��@rI��r��_PythonExceptionQualifierr���ra��rc��suspendresumerd��zdmi.bios.versionrb��Fr���zBUG: unable to handlez^BUG: unable to handle (.*) at z,could not parse expected problem type line: zIP: z Call Trace:Tr���)re���rz���rM��r��r��r���subrN��r4���r-���islinkrR��r���rp���r���r|���r��_extract_function_and_addressr���)r���sigregexr+���r��r��linesrQ��loc_rer ��exc_name in_trace_bodyr��parsedr��s��� r���crash_signaturezReport.crash_signature#��s���2� 4 ' &*GG� 4 D$7=$HCJJ;<E\*557� .KK%3!''!*--C .�J� 88H  $);t)C'(3.6H1IIC66+VS9 9� d "x4'7*+,Ad8n-=>Czz"STH)446E5zA~� NN4(3!''!*": ;;C�  �J� $ %002EC5zQHHZq2,-3aggaj@@5zA~ZZ LMF� 4LL&�wwqzZ/sQWWQZ//�GGAJ77>>!, " 0 0 3A1#Qqwwqzl33 4�Rys+A.H a%@ AB!DD�()C/(:S@ @  , .93DDO+x4 ?/J9o88M*QtM2344C88./Qt$67899C �  !MEZ(..t4� .??#:;YY'H$OF & Q!QI$PQ! U+??6* >>tDE U+__]3$(M" EQ3 $ B B4 H !LL/(- 3 .4�xx&]��  s��� P� PPr+���c���������������������t��������j������������������d|�������}|r'|j������������������d������}|s J�d|���������|d���dk7��r|S�y�)Nz \[.*\] (.*)$r���z*could not parse expected call trace line: r���?)re���r|���r��)r+���r��r��s��� r���r{��z$Report._extract_function_and_address��sJ����?D1 LLOE MFtfM M5Qx3 r7���c�����������������B���d|�vsd|�vsd|�vryd|�d���v�ryg�}d}|�d���j�������������������������D�]��}|j������������������d������rq|j�������������������������d���}|j������������������d ������s9t��������|d ������}|d k��rK|�j ������������������|������}|r"|j ������������������|j ������������������d d �������������n|dz ��}t��������|������dk\��s�n�|dkD��rt��������|������|z ��dk��ry|dk(��rt��������|������dk��s|dkD��rt��������|������dk��ry|�d����d |�d����d d j������������������|�������S�)a��Compute heuristic duplicate signature for a signal crash. This should be used if crash_signature() fails, i. e. Stacktrace does not have enough symbols. This approach only uses addresses in the stack trace and does not rely on symbol resolution. As we can't unwind these stack traces, we cannot limit them to the top five frames and thus will end up with several or many different signatures for a particular crash. But these can be computed and synchronously checked with a crash database at the client side, which avoids having to upload and process the full report. So on the server-side crash database we will only have to deal with all the equivalence classes (i. e. same crash producing a number of possible signatures) instead of every single report. Return None when signature cannot be determined. rm��r��r��NzErrno 13r���#r���0x���i���rJ��z..���r!��rD�����r���) rM��r���r���ru��_address_to_offsetr��r;���rN��r���)r���stackfailedr+���addroffsets��� r���r��z Report.crash_signature_addresses��sH���$� T !\%=QUAU j) )&113� Ds#zz|At,4}�&=006LLT!:;aKF �5zR- 4� A:#e*v-1� aKCJN s5zA~'()4>*:!CHHUO;LMMr7���c����������� ���������g�}t��������j�������������������������dkD��r-t��������j������������������t��������j�������������������������������}t ��������|d���������dk\��r@|j ������������������t��������j������������������dt��������j������������������|d����������d������df�������|j ������������������t��������j������������������dt��������j������������������|d����������d������df�������|d���j������������������d������D�]^��}|j�������������������������}t ��������|������dkD��s"|j ������������������t��������j������������������d t��������j������������������|�������d������d f�������`�t��������j�������������������������d ���}t ��������|������dk\��r=|j ������������������t��������j������������������dt��������j������������������|�������d������d f������� �|�d =�|�D�]��}|j������������������d������xr�|dv}|s d|v�s|dv�s%t��������|�|���d������s5|D�]i��\��}}t!��������|�|���t"��������������r9|j%������������������||�|���j'������������������dd������������j)������������������d������|�|<���R|j%������������������||�|���������|�|<���k��y#�t��������$�r�Y�w�xY�w)zRemove user identifying strings from the report. This particularly removes the user name, host name, and IPs from attributes which contain data read from the environment, and removes the ProcCwd attribute completely. r���r��z\busernamer��z/home/usernamer!��,z(\b|\s)z \1User Namer���hostnamerH��Proc) ProcCpuinform��r?��ProcInterrupts ProcModulesr��>���TitlerG�� PythonArgs JournalErrorsisspacer:���r;���r<���N)r4���r~��r,��r-��r.��rN��r��re���rz���rP��r���r'���r$��rp���r���r��rt���ry���ry��rC���rx���) r��� replacementsr��r\��r��rT�� is_proc_fieldr~���repls ��� r��� anonymizezReport.anonymize��s6���� 99;? RZZ\*A1Q4yA~##RZZ2bii!o5Fb0I%JJ$WX   r"))AaD/!2"568HI �qTZZ_� GGIq6A: ''wryy|nB$?@.Q �88:a= x=A    r"))H2E1Fb,I!JJ W X Y�� =ALL0�Q�?�6M�1$MMtAw 2%1�=MGT!$q'51")++ $q'..."K# &/�Q�#*++dDG"<Q = =��   s���+I� I"!I"sandboxc��������������������d|�v�sJ�|�j������������������d|�d���������}d}d|�v�r|�d���t��������j�������������������������k(��rd}|r!t��������j������������������j ������������������|dd������nd}t ��������d |������}|s<t��������t��������j������������������t��������j������������������t��������j������������������������d ������|g}i�}|s1t ��������d |������} | r| g}nt��������j������������������j������������������d �������|rd } |dd|�ddd|z���dd|z���dd|�d| �d|�d| �gz ��}|r:|�d|�d| �d|�d| �d|�d } |�d} || | | |�d| �ddz��}dg|dd�|dd|�dgz ��}t��������j������������������j������������������||z���������s;|j������������������d������r*t��������j������������������j������������������||d d�z���������r|d d�}||z���}|dd!|�d"gz ��}d#|�v�r&t!��������|�d#���d$������rlt#��������j$������������������d%&������\��} }t'��������j(������������������t��������j*������������������|�������t��������j������������������| |�d#����������t��������j,������������������| �������nt/��������|�d#���t0��������j2������������������������r|t#��������j$������������������d%&������\��} }t'��������j(������������������t��������j*������������������|�������t��������j,������������������| �������t5��������|d'������5�}|�d#���j������������������|�������ddd�������n|�d#���d���}|dd(|z���gz ��}||fS�#�1�sw�Y���xY�w))a"��Build gdb command for this report. This builds a gdb command for processing the given report, by setting the file to the ExecutablePath/InterpreterPath, unpacking the core dump and pointing "core-file" to it (if the report has a core dump), and setting up the paths when calling gdb in a package sandbox. When available, this calls "gdb-multiarch" instead of "gdb", for processing crash reports from foreign architectures. Return argv list for gdb and any environment variables. r���rE��Fr"��TusrbinNgdbzgdb not found in retracing envz gdb-multiarchzWARNING: Please install gdb-multiarch for processing reports from foreign architectures. Results with "gdb" will be very poor. zx86_64-linux-gnur��zset debug-file-directory z/usr/lib/debugzset solib-absolute-prefix zadd-auto-load-safe-path zset solib-search-path z/lib/rJ��z /usr/lib/z/lib:z/usr/libz/usrz/gconv)r��r��� PYTHONHOME GCONV_PATHzld-linux-x86-64.so.2r���zset data-directory z/usr/share/gdbrD��zfile ""r��r�� apport_core_)prefixwbz core-file )r���r���r%��r4���r-���r���r���r��rz��r{��r��sysrV���r��r���r���r��r��r��atexitregisterr���r��rt���ru���rv���r&���)r���r��r�� executable same_archgdb_sandbox_bingdb_pathrP���r���manative_multiarch ld_lib_pathpyhomer*���r��r ��s��� r���r��zReport.gdb_command2��s`���"� 4'''XX/6F1GH  d "^$ (I(I(KKI�8CBGGLLeU 3� �$E?;#  ELL)0�  �*"$!/?CB$   + � 1  +G9NC,w6*W4( 7G6HG9I&6%79 � G�"m�$#}E*:); }I.>-? }H.� �(=-'2'"(%0M;K:LF"S � � 66 F&9+n$UVV77>>'J"67((0ww~~g 12&>?%/^  :-JFfZL233  tJ'0%--^D T 40T*-. D,n.L.LM%--^D T 40 $%�.$**1-.�.�J'*  t 34 4G.�.s ���0K$$K-c���������������������|�j��������������������������|�j������������������D�]!��\��}}}||cxk��r|k��sn�|�d||z ��dc�S��y)a^��Resolve a memory address to an ELF name and offset. This can be used for building duplicate signatures from non-symbolic stack traces. These often do not have enough symbols available to resolve function names, but taking the raw addresses also is not suitable due to ASLR. But the offsets within a library should be constant between crashes (assuming the same version of all libraries). This needs and uses the "ProcMaps" field to resolve addresses. Return 'path+offset' when found, or None if address is not in any mapped range. +xN)_build_proc_maps_cacher���)r���r��startendelfs��� r���r��zReport._address_to_offset��sU����� ##%#44� 1OE3##au Q/00 1�r7���c����������� ���������|�j�������������������ryd|�v�sJ�g�|�_���������t��������j������������������d������}t��������j������������������d������}|�d���j�������������������������D�]��}|j �������������������������s|j ������������������|������}|s|j ������������������|������r9|s J�d|z����������|�j�������������������j ������������������t��������|j������������������d������d������t��������|j������������������d������d������|j������������������d ������f��������y) z_Generate self._proc_maps_cache from ProcMaps field. This only gets done once. Nrm��z-^([0-9a-fA-F]+)-([0-9a-fA-F]+).*\s{2,}(\S.*$)z ^([0-9a-fA-F]+)-([0-9a-fA-F]+)\szcannot parse ProcMaps line: r���r��r��rD��) r���re���rz���rM��r'���r��r��ru��r��)r���fmt fmt_unknownr+���r��s��� r���r��zReport._build_proc_maps_cache��s���� �  T!!! " �jjIJjj!DE $//1� D::< $A$$T*�?84??q  ! ! ( (QWWQZ$c!''!*b&91771:F  r7���coredump coredump_keyrf���c�����������������p����|j������������������|������}t��������|t��������������sJ�|j�������������������������|�|<���y�r;��)r���rt���rD���r]���)r���r��r��rf���r��s��� r���_add_str_from_coredumpzReport._add_str_from_coredump��s1����� \*%%%%LLNS r7���c�����������������H���|j������������������d������}|rt��������|t��������������sJ�||�d<���y�|j������������������d������}|r,t��������|t��������������sJ� �t ��������j ������������������|������|�d<���y�y�#�t ��������$�r,�t��������j������������������t��������������j������������������d|�������Y�y�w�xY�w)NCOREDUMPr��COREDUMP_FILENAMEz:Ignoring COREDUMP_FILENAME '%s' because it does not exist.) r���rt���ry���rD���ru���CompressedFiler��r��� getLoggerr���warning)r���r��dumpfilenames��� r���#_add_coredump_from_systemd_coredumpz*Report._add_coredump_from_systemd_coredump��s����||J' dE* **#D  << 34 h, ,, #1#@#@#JZ � �%� !!(+33P s���A,�,2B! B!c�����������������F���|j������������������d������}t��������|t��������j������������������������sJ��|�t��������j������������������|j �������������������������������������}|j������������������d������}t��������|t ��������������sJ�||_��������|j������������������d������}t��������|t ��������������sJ�t��������|������|d<���|j������������������|dd�������|j������������������|dd �������|j������������������|d d �������|j������������������|d d �������|j������������������|dd�������|j������������������|dd�������|j������������������d������}t��������|t��������������sJ�|j������������������t��������j������������������|�������������|j��������������������������|j������������������d������dk7��r|j������������������|�������|S�)a]��Convert the givin systemd coredump into a problem report. The following keys are not used: * COREDUMP_CGROUP (str) * COREDUMP_COMM (str) * COREDUMP_CONTAINER_CMDLINE (str) * COREDUMP_GID (int) * COREDUMP_HOSTNAME (str) * COREDUMP_OPEN_FDS (str) * COREDUMP_OWNER_UID (str) * COREDUMP_PACKAGE_JSON (str) * COREDUMP_PACKAGE_NAME * COREDUMP_PACKAGE_VERSION * COREDUMP_PROC_AUXV (bytes) * COREDUMP_PROC_CGROUP (str) * COREDUMP_PROC_LIMITS (str) * COREDUMP_PROC_MOUNTINFO (str) * COREDUMP_RLIMIT (str) * COREDUMP_ROOT (str) * COREDUMP_SESSION * COREDUMP_SLICE (str) * COREDUMP_UID (int) * COREDUMP_UNIT (str) * COREDUMP_USER_UNIT (str) * MESSAGE (str) COREDUMP_TIMESTAMP)r��� COREDUMP_PIDCOREDUMP_SIGNALr��COREDUMP_SIGNAL_NAMEr ��COREDUMP_CMDLINErA�� COREDUMP_EXEr��� COREDUMP_CWDrH��COREDUMP_PROC_MAPSrm��COREDUMP_PROC_STATUSr?��COREDUMP_ENVIRONCOREDUMP_TRUNCATED1)r���rt���datetimetimeasctime timetupleru��r.���rD���r��r��r���r���r}��r��)r���r��r���r}���r.���r#��r���s��� r���from_systemd_coredumpzReport.from_systemd_coredump��sp���8�||01$ 1 1222$,,t~~'789ll>*#s###  %67 ----}-x%%h0F U%%h0BMR%%h@PQ%%h J%%h0DjQ%%h0F U,,12'3'''L44W=>((* ::* +s 2  6 6x @ r7���)CrashNr;��r���)NNNNN):r���r���r���r���rD���r��� staticmethodr���r���r���r���r��r��r)��r8��rY��rS��rO��ru��r���r��r}��r|��r���r��boolr��r��r��r���r��r��r ��r��r%��r2��r=��rB��rE��rY��r]��rh��listrq��r��r{��r��r��tupledictr��r��r��objectr��r��r���r��r���r7���r���r���r���T��s.��� HS� H#*� HPT� H�C�C��.3�3:�*C�C�&$Nd �$Nd�$NL(<T,#�,$�,4G$'4RVhC$J�0�C�C$J���!%"&)- ^ 3Y ^�4Z^�3-$& ^ �  ^@Y �)-"& - 4Z-�3-$&-�4Z - �  ->�GK& #& /7}t/C& & P"t�"J�EI~DTz~D7:Tz~D ~D@M<b�!"!%  TM�t�$J  �  .BB#&:B;>:B BH)sTz�)cDj�)V�.�.`-#�-5t�5n+Z?t�?"t�-S4Z�-^ t� ,9d �9v49�&Nt�N`�C�C$J��:N3:�:Nx7=t�>Bo Tzo 03d o tCy$sCx.( )o b,B#S&[)#9<#CF# #Df<M�RV�$�6�6r7���r���r��)Ni��)Mr���r��r��rz��r<��r��r0��importlib.utilrc��rA���r���r4���r#���r,��re���r���r!��r��rX���r��r��r��r��� urllib.errorr�� urllib.parseurllib.requestxml.domrj���xml.dom.minidomxml.parsers.expatcollections.abcr���r���apport.fileutilsr���apport.loggingru���apport.hookutilsr���apport.packaging_implr���r��� apport.uir���r���r���r��� _data_dirr��r��r��r��r*��r,��r+��r-��rL��r���rD���r,���ru��r6���rG���rO���r��r��r/��rb���r���r���r���r���r���r���r���r���r���r7���r���<module>r�����s���A��� �� � �� �� �� � � � � �� �� ��������.����,�3�2 JJNN,.A B [0�[0� �zz~~24JK �, *0�1�  & 5  S�  Xc]�  �=A .  .$J ./2Tz . .�=A& &$J&/2Tz&&&*�MQ# #Y#!#s(^d2#DI##L!/H !:,  4S>�  PV^ ) )�Vr7���