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

Segfault when annotating one specific task #2049

Closed
otwieracz opened this issue Jul 18, 2018 · 6 comments
Closed

Segfault when annotating one specific task #2049

otwieracz opened this issue Jul 18, 2018 · 6 comments
Milestone

Comments

@otwieracz
Copy link

I've got following task:

[otwieracz@odyssey-otwiera-cz ~]$ task 15 info

Name          Value                                                                          
ID            15
Description   Opłcić EP                                                                      
                2018-06-25 19:55:00 Wpisowe opłacone, pozostały składki oraz ostatnie latanie
                2018-06-27 07:10:29 Latanie opłacone, pozostały skła                         
                2018-07-01 20:49:50 Nadal czekam na przyjęci                                 
                2018-07-06 20:45:18 Nadal czekam na przyjęcie, trzeba zadzwonić do           
                2018-07-15 21:38:26 S nie odpowiada, jutro zadzwonić                         
Status        Pending
Project       fly                                                                            
Entered       2018-06-22 18:38:06 (3w)
Due           2018-07-20 23:59:59                                                            
Last modified 2018-07-18 07:49:58 (3min)
Virtual tags  ANNOTATED DUE MONTH PENDING READY UNBLOCKED WEEK YEAR PROJECT                  
UUID          c8c40896-052f-4518-8a80-ae6183b1082f
Urgency       9.716                                                                          

    project          1 *    1 =      1
    annotations      1 *    1 =      1
    due          0.632 *   12 =   7.58
    age          0.068 *    2 =  0.137
                                ------
                                 9.716

Date                Modification                                                                    
2018-07-18 07:30:15 Annotation of 'Wpisowe opłacone, pozostały składki oraz ostatnie latanie' added.
                    Due changed from '2018-06-25 00:00:00' to '2018-06-28 00:00:00'.
2018-07-18 07:30:15 Annotation of 'Latanie opłacone, pozostały składki' add                         
                    Due changed from '2018-06-28 00:00:00' to '2018-07-02 00:00:00'.                
2018-07-18 07:30:15 Annotation of 'Nadal czekam na przyjęcie' added
                    Wait set to '2018-07-06 20:49:50'.
                    Due changed from '2018-07-02 00:00:00' to '2018-07-08 20:49:50'.
                    Status changed from 'pending' to 'waiting'.
2018-07-18 07:30:15 Annotation of 'Nadal czekam na przyjęcie, trzeba zadzwonić do KMdue:5d' adde    
2018-07-18 07:30:15 Wait deleted.
                    Due changed from '2018-07-08 20:49:50' to '2018-07-13 00:00:00'.
                    Status changed from 'waiting' to 'pending'.
2018-07-18 07:30:15 Annotation changed to 'Nadal czekam na przyjęcie, trzeba zadzwonić do KM        
2018-07-18 07:30:15 Annotation of 'S nie odpowiada, jutro zadzwonić' added
                    Due changed from '2018-07-13 00:00:00' to '2018-07-16 00:00:00'.
2018-07-18 07:30:15 Annotation of 'S nie odbiera, pozostaje mi jedynie dzwonić dalej' added         
                    Due changed from '2018-07-16 00:00:00' to '2018-07-20 23:59:59'.                
2018-07-18 07:47:13 Annotation 'S nie odbiera, pozostaje mi jedynie dzwonić dalej' deleted
2018-07-18 07:47:37 Annotation of 'S nie odbiera, pozostaje mi jedynie dzwonić dalej' added         
2018-07-18 07:48:11 Annotation 'S nie odbiera, pozostaje mi jedynie dzwonić dalej' deleted
2018-07-18 07:49:37 Annotation of 'S nadal nie odpowiada, trzeba dzwonic dalej' added.              
2018-07-18 07:49:58 Annotation 'S nadal nie odpowiada, trzeba dzwonic dalej' deleted.

When trying to annotate it:

[otwieracz@odyssey-otwiera-cz ~]$ task 15 ann Foobar
Annotating task 15 'Opłcić EPBA'.
Annotated 1 task.
Project 'fly' is 0% complete (1 task remaining).
[otwieracz@odyssey-otwiera-cz ~]$ task 15
/usr/include/c++/8/bits/basic_string.h:1029: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference = const char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.
Aborted (core dumped)

Annotation text does not seem to matter.

gdb output:

[otwieracz@odyssey-otwiera-cz ~]$ gdb task
GNU gdb (GDB) Fedora 8.1-19.fc28
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from task...Reading symbols from /usr/lib/debug/usr/bin/task-2.5.1-7.fc28.x86_64.debug...done.
done.
(gdb) run 15
Starting program: /usr/bin/task 15
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.27-19.fc28.x86_64
warning: Loadable section ".note.gnu.property" outside of ELF segments
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
/usr/include/c++/8/bits/basic_string.h:1029: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference = const char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6ba6f2b in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install gmp-6.1.2-7.fc28.x86_64 gnutls-3.6.2-3.fc28.x86_64 libffi-3.1-16.fc28.x86_64 libgcc-8.1.1-1.fc28.x86_64 libidn2-2.0.5-1.fc28.x86_64 libstdc++-8.1.1-1.fc28.x86_64 libtasn1-4.13-2.fc28.x86_64 libunistring-0.9.10-1.fc28.x86_64 libuuid-2.32-2.fc28.x86_64 nettle-3.4-2.fc28.x86_64 p11-kit-0.23.12-1.fc28.x86_64
(gdb) bt
#0  0x00007ffff6ba6f2b in raise () from /lib64/libc.so.6
#1  0x00007ffff6b91561 in abort () from /lib64/libc.so.6
#2  0x00005555555ca808 in std::__replacement_assert (__file=__file@entry=0x5555556ed348 "/usr/include/c++/8/bits/basic_string.h", __line=__line@entry=1029, 
    __function=__function@entry=0x5555556f3ca0 <_ZZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEmE19__PRETTY_FUNCTION__> "std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) con"..., __condition=__condition@entry=0x5555556ecf8b "__pos <= size()") at /usr/include/c++/8/x86_64-redhat-linux/bits/c++config.h:2389
#3  0x0000555555626010 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[] (__pos=<optimized out>, this=0x5555559f8080) at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/utf8.cpp:95
#4  utf8_next_char (input="  2018-07-15 21:38:26 S nie odpowiada, jutro zadzwon", <incomplete sequence \304>, i=@0x7fffffffbf70: 55) at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/utf8.cpp:77
#5  0x0000555555626493 in utf8_text_width (str="  2018-07-15 21:38:26 S nie odpowiada, jutro zadzwon", <incomplete sequence \304>) at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/utf8.cpp:252
#6  0x0000555555622ddf in leftJustify(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) () at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/text.cpp:633
#7  0x00005555556c8517 in Column::renderStringLeft(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int, Color&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/columns/Column.cpp:325
#8  0x00005555556d6834 in ColumnString::render(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, Color&) () at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/columns/ColString.cpp:96
#9  0x0000555555613ac6 in ViewText::render[abi:cxx11]() () at /usr/include/c++/8/bits/char_traits.h:310
#10 0x000055555569f37b in CmdInfo::execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () at /usr/include/c++/8/bits/char_traits.h:320
#11 0x00005555555be0eb in Context::dispatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) () at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/Context.cpp:465
#12 0x00005555555bed02 in Context::run() () at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/Context.cpp:315
#13 0x00005555555ba5b2 in main () at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/main.cpp:52
#14 0x00007ffff6b9318b in __libc_start_main () from /lib64/libc.so.6
#15 0x00005555555bc55a in _start () at /usr/src/debug/task-2.5.1-7.fc28.x86_64/src/Context.cpp:831
@otwieracz
Copy link
Author

otwieracz commented Jul 18, 2018

I've missed it in first report, sorry about that:

TASK DIAGNOSTICS

[otwieracz@odyssey-otwiera-cz ~]$ task diagnostics

task 2.5.1
   Platform: Linux

Compiler
    Version: 8.0.1 20180207 (Red Hat 8.0.1-0.12)
       Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
 Compliance: C++11

Build Features
      Built: Feb 10 2018 00:36:43
      CMake: 3.10.1
    libuuid: libuuid + uuid_unparse_lower
  libgnutls: 3.6.1
 Build type: 

Configuration
       File: /home/otwieracz/.taskrc (found), 1919 bytes, mode 100644
       Data: /home/otwieracz/.task (found), dir, mode 40755
    Locking: Enabled
         GC: Enabled
     Server: freecinc.com:53589
         CA: /home/otwieracz/.task/freecinc_XXX.ca.pem, readable, 3755 bytes
      Trust: strict
Certificate: /home/otwieracz/.task/freecinc_XXX.cert.pem, readable, 3745 bytes
        Key: /home/otwieracz/.task/freecinc_XXX.key.pem, readable, 25134 bytes
    Ciphers: NORMAL
      Creds: FreeCinc/freecinc_XXX/************************************

Hooks
     System: Enabled
   Location: /home/otwieracz/.task/hooks
             (-none-)

Tests
      $TERM: screen-256color (356x76)
       Dups: Scanned 113 tasks for duplicate UUIDs:
             No duplicates found
 Broken ref: Scanned 113 tasks for broken references:
             No broken references found

Further debugging

Adding . after previous annotation:

  Annotation:        2018-07-15 21:38:26 -- S nie odpowiada, jutro zadzwonić.

seems to prevent segfault.

Until now I've ignored missing word endings, like:

[otwieracz@odyssey-otwiera-cz ~]$ task 15 info | grep Description
Description   Opłcić EP

vs

[otwieracz@odyssey-otwiera-cz ~]$ task 15 edit

(...)
  Description:       Opłcić EPBA
(...)

Actually something is missing in every single annotation line in this task (and all my tasks are affected like that)

Furthermore:

[otwieracz@odyssey-otwiera-cz ~]$ task 15 info

Name          Value                                                                          
ID            15
Description   Opłcić EP                                                                      
                2018-06-25 19:55:00 Wpisowe opłacone, pozostały składki oraz ostatnie latanie
                2018-06-27 07:10:29 Latanie opłacone, pozostały skła                         
                2018-07-01 20:49:50 Nadal czekam na przyjęci                                 
                2018-07-06 20:45:18 Nadal czekam na przyjęcie, trzeba zadzwonić do           
                2018-07-15 21:38:26 S nie odpowiada, jutro zadzwonić.                        
Status        Pending
(...)

[otwieracz@odyssey-otwiera-cz ~]$ task 15 ann Foobar
Annotating task 15 'Opłcić EPBA'.
Annotated 1 task.
Project 'fly' is 0% complete (1 task remaining).
[otwieracz@odyssey-otwiera-cz ~]$ task 15 info

Name          Value                                                                          
ID            15
Description   Opłcić EP                                                                      
                2018-06-25 19:55:00 Wpisowe opłacone, pozostały składki oraz ostatnie latanie
                2018-06-27 07:10:29 Latanie opłacone, pozostały skła                         
                2018-07-01 20:49:50 Nadal czekam na przyjęci                                 
                2018-07-06 20:45:18 Nadal czekam na przyjęcie, trzeba zadzwonić do           
                2018-07-15 21:38:26 S nie odpowiada, jutro zadzwonić                         
                2018-07-18 09:07:47 Foobar                                                   
Status        Pending
(...)

Do you see how dot in annotation diasppeared after adding another one?

                2018-07-15 21:38:26 S nie odpowiada, jutro zadzwonić.

vs

                2018-07-15 21:38:26 S nie odpowiada, jutro zadzwonić

Something is SERIOUSLY wrong here!

@janikrabe
Copy link
Contributor

This issue appears to have been fixed in d025f3d. I can no longer reproduce it with the following commands:

task add Test
task 1 ann ć
task 1 ann x
task 1

Please check if the issue still occurs when building the 2.6.0 branch from source.

@pbeckingham pbeckingham added the type:bug Something isn't working label Aug 12, 2018
@pbeckingham
Copy link
Member

I also think this is fixed. Please replicate.

@otwieracz
Copy link
Author

Are there precompiled 2.6.0 packages available somewhere?

@pbeckingham
Copy link
Member

pbeckingham commented Sep 24, 2018 via email

@tbabej tbabej added this to the 2.6.0 milestone Dec 30, 2020
@tbabej tbabej removed the status:awaiting response Awaiting response from submitter. label Dec 30, 2020
@tbabej
Copy link
Sponsor Member

tbabej commented Dec 30, 2020

Confirmed, fixed in 2.6.0.

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

No branches or pull requests

4 participants