How to find ancestor chain of a process?

It looks like pstree can do what you want, with it's -s Show parent processes of the specified process option

$ pstree -s 5698 
init───mdm───mdm───init───at-spi-bus-laun───dbus-daemon

Or more info (arguments) and prettier with the -a option

mint@mint ~ $ pstree -s -a 5698 
init
  └─mdm
      └─mdm
          └─init --user
              └─at-spi-bus-laun
                  └─dbus-daemon --config-file=/etc/at-spi2/accessibility.conf ...

Or a few options together

$ pstree -s -p -a -G -l 5698 
init,1
  └─mdm,1994
      └─mdm,5358
          └─init,5379 --user
              └─at-spi-bus-laun,5691
                  └─dbus-daemon,5698 --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3